File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -18,10 +18,10 @@ jobs:
1818 with :
1919 fetch-depth : 0
2020
21- # Create a lowercase version of the repository name
22- - name : Set lower case owner and repo
21+ # Ensure lowercase to avoid registry errors
22+ - name : Set lower case repo name
2323 run : |
24- echo "REPO_LOWER= ${GITHUB_REPOSITORY,,}" >> ${GITHUB_ENV}
24+ echo "IMAGE_NAME=ghcr.io/ ${GITHUB_REPOSITORY,,}" >> ${GITHUB_ENV}
2525
2626 - name : Bump version and push tag
2727 id : tagger
@@ -41,14 +41,16 @@ jobs:
4141 id : build_image
4242 uses : redhat-actions/buildah-build@v2
4343 with :
44- image : ghcr.io/${{ env.REPO_LOWER }}
44+ # Use the full name in tags to satisfy both build and push actions
4545 tags : |
46- ${{ steps.tagger.outputs.new_tag }}
47- latest
46+ ${{ env.IMAGE_NAME }}:${{ steps.tagger.outputs.new_tag }}
47+ ${{ env.IMAGE_NAME }}: latest
4848 context : .
4949 containerfiles : ./Dockerfile
5050
5151 - name : Push to GHCR
5252 uses : redhat-actions/push-to-registry@v2
5353 with :
54+ # Providing tags from the previous step is sufficient
55+ # when they are "fully qualified" (contain the registry URL)
5456 tags : ${{ steps.build_image.outputs.tags }}
You can’t perform that action at this time.
0 commit comments