From 83822ed61ea3b3fdab59006ec3b8c02b2c3ec21b Mon Sep 17 00:00:00 2001 From: Yannick Marcon Date: Wed, 8 May 2024 11:01:41 +0200 Subject: [PATCH] fix: REGISTRY is an env variable --- .github/workflows/docker-publish.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index 28b4596..d0a984e 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -9,6 +9,7 @@ jobs: name: Push Docker image to Docker Hub runs-on: ubuntu-latest env: + REGISTRY: index.docker.io IMAGE_NAME: obiba/obiba-r permissions: id-token: write @@ -20,14 +21,14 @@ jobs: uses: actions/checkout@v4 - name: Log in to Docker Hub - uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a + uses: docker/login-action@v3 with: username: ${{ secrets.DOCKER_HUB_USERNAME }} password: ${{ secrets.DOCKER_HUB_TOKEN }} - name: Extract metadata (tags, labels) for Docker id: meta - uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7 + uses: docker/metadata-action@v5 with: images: ${{ env.IMAGE_NAME }} tags: | @@ -37,7 +38,7 @@ jobs: - name: Build and push Docker image id: push - uses: docker/build-push-action@3b5e8027fcad23fda98b2e3ac259d8d67585f671 + uses: docker/build-push-action@v5 with: context: . file: ./Dockerfile @@ -49,7 +50,7 @@ jobs: - name: Generate artifact attestation uses: actions/attest-build-provenance@v1 with: - subject-name: ${{ env.IMAGE_NAME }} + subject-name: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} subject-digest: ${{ steps.push.outputs.digest }} push-to-registry: true