Skip to content

update

update #48

Workflow file for this run

name: build
on:
push:
workflow_dispatch:
jobs:
docker:
runs-on: ubuntu-latest
permissions:
id-token: write
packages: write
contents: read
attestations: write
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.CR_PAT }}
- name: Build and push
id: push
if: ${{ github.event_name == 'push' }}
uses: docker/build-push-action@v6
with:
context: .
push: true
tags: ghcr.io/dream10201/115docker:dev,docker.io/xiuxiu10201/115:dev
- name: Build and push
id: push

Check failure on line 37 in .github/workflows/docker-image.yml

View workflow run for this annotation

GitHub Actions / build

Invalid workflow file

The workflow is not valid. .github/workflows/docker-image.yml (Line: 37, Col: 13): The identifier 'push' may not be used more than once within the same scope.
if: ${{ github.event_name == 'workflow_dispatch' }}
uses: docker/build-push-action@v6
with:
context: .
push: true
tags: ghcr.io/dream10201/115docker:latest,docker.io/xiuxiu10201/115:latest
- name: Attest for github
uses: actions/attest-build-provenance@v1
with:
subject-name: ghcr.io/dream10201/115docker
subject-digest: ${{ steps.push.outputs.digest }}
push-to-registry: true
- name: Attest for docker
uses: actions/attest-build-provenance@v1
with:
subject-name: index.docker.io/dream10201/115docker
subject-digest: ${{ steps.push.outputs.digest }}
push-to-registry: true