diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index f3558f14..66dbdb25 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -9,6 +9,7 @@ on: # Defines two custom environment variables for the workflow. These are used for the Container registry domain, and a name for the Docker image that this workflow builds. env: REGISTRY: ghcr.io + NAMESPACE: ${{ github.repository_owner }} # There is a single job in this workflow. It's configured to run on the latest available version of Ubuntu. jobs: @@ -40,7 +41,7 @@ jobs: id: meta uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7 with: - images: ${{ env.REGISTRY }}/${{ matrix.image }} + images: ${{ env.REGISTRY }}/${{ env.NAMESPACE }}/${{ matrix.image }} - name: Build and push Docker image id: push @@ -48,12 +49,13 @@ jobs: with: context: . push: true + target: ${{ matrix.image }} tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} - name: Generate artifact attestation uses: actions/attest-build-provenance@v1 with: - subject-name: ${{ env.REGISTRY }}/${{ matrix.image }} + subject-name: ${{ env.REGISTRY }}/${{ env.NAMESPACE }}/${{ matrix.image }} subject-digest: ${{ steps.push.outputs.digest }} push-to-registry: true