Closed aduzsardi closed 1 year ago
This is the right syntax: ghcr.io/${{ github.repository }}:${{ env.GITHUB_RUN_NUMBER }}
Thank you @crazy-max , i tried that but when it's building the image the variable reference is empty. I've seen people setting it at an earlier step , shouldn't this be available in all steps since it's a default env variable ?
/usr/bin/docker buildx build --iidfile /tmp/docker-build-push-2lFKFi/iidfile --tag ghcr.io/aduzsardi/test-cicd:latest --tag ghcr.io/aduzsardi/test-cicd: --metadata-file /tmp/docker-build-push-2lFKFi/metadata-file --push . ERROR: invalid tag "ghcr.io/aduzsardi/test-cicd:": invalid reference format Error: buildx failed with: ERROR: invalid tag "ghcr.io/aduzsardi/test-cicd:": invalid reference format
Maybe using the github context? ghcr.io/${{ github.repository }}:${{ github.run_number }}
?
Yep , that works. Well ¯_(ツ)_/¯ , i must have been reading something wrong.
Thank you!
Hi, I just started using GH Actions i'm confused as to why the
GITHUB_RUN_NUMBER
is not working in this action withing a workflow For example