File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -21,20 +21,21 @@ jobs:
2121 - name : Log in to GHCR using GITHUB_TOKEN
2222 run : echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
2323
24- - name : Extract tag and repo name
24+ - name : Extract tag or fallback to latest
2525 id : meta
2626 run : |
2727 REF=${GITHUB_REF##*/}
2828 if [[ "${GITHUB_REF}" == refs/heads/* ]]; then
2929 REF=latest
3030 fi
31- echo "tag=$(echo $REF | tr '[:upper:]' '[:lower:]')" >> "$GITHUB_OUTPUT"
32- echo "repo=$(echo '${GITHUB_REPOSITORY##*/}' | tr '[:upper:]' '[:lower:]')" >> "$GITHUB_OUTPUT"
31+ echo "tag=$(echo "$REF" | tr '[:upper:]' '[:lower:]')" >> "$GITHUB_OUTPUT"
32+ echo "repo=$(echo "${{ github.event.repository.name }}" | tr '[:upper:]' '[:lower:]')" >> "$GITHUB_OUTPUT"
33+ echo "owner=$(echo "${{ github.repository_owner }}" | tr '[:upper:]' '[:lower:]')" >> "$GITHUB_OUTPUT"
3334
3435 - name : Build Docker image
3536 run : |
36- docker build -t ghcr.io/${{ github.repository_owner }}/${{ steps.meta.outputs.repo }}:${{ steps.meta.outputs.tag }} .
37+ docker build -t ghcr.io/${{ steps.meta.outputs.owner }}/${{ steps.meta.outputs.repo }}:${{ steps.meta.outputs.tag }} .
3738
3839 - name : Push Docker image
3940 run : |
40- docker push ghcr.io/${{ github.repository_owner }}/${{ steps.meta.outputs.repo }}:${{ steps.meta.outputs.tag }}
41+ docker push ghcr.io/${{ steps.meta.outputs.owner }}/${{ steps.meta.outputs.repo }}:${{ steps.meta.outputs.tag }}
You can’t perform that action at this time.
0 commit comments