diff --git a/.github/workflows/docker-image-publish.yml b/.github/workflows/docker-image-publish.yml index a4971032b..ed6ffaa92 100644 --- a/.github/workflows/docker-image-publish.yml +++ b/.github/workflows/docker-image-publish.yml @@ -60,6 +60,7 @@ jobs: run: echo "IMAGE_NAME_LOWER=$(echo ${{ env.IMAGE_NAME }} | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV - name: Build and push Docker image + id: build-and-push uses: docker/build-push-action@v2 with: context: . @@ -79,8 +80,9 @@ jobs: chmod +x /usr/local/bin/cosign - name: Sign the published Docker image - if: ${{ github.event_name != 'pull_request' }} + if: github.event_name != 'pull_request' env: TAGS: ${{ steps.meta.outputs.tags }} DIGEST: ${{ steps.build-and-push.outputs.digest }} - run: echo "${TAGS}" | xargs -I {} cosign sign --yes {}@${DIGEST} + run: | + echo "${TAGS}" | xargs -I {} cosign sign --yes {}@${DIGEST}