2222
2323env :
2424 REPO_NAME : ${{ github.repository }}
25- REPO_LOWER : ${{ github.repository_owner }}/networking-toolbox
2625
2726jobs :
2827 build :
@@ -47,22 +46,24 @@ jobs:
4746 id : tags
4847 run : |
4948 TAGS=""
49+ REPO_LOWER=$(echo "${{ env.REPO_NAME }}" | tr '[:upper:]' '[:lower:]')
5050
5151 if [[ "${{ github.event_name }}" == "workflow_dispatch" && -n "${{ inputs.tag }}" ]]; then
5252 # Manual dispatch with custom tag
5353 TAG="${{ inputs.tag }}"
54- TAGS="docker.io/${{ env. REPO_LOWER }} :${TAG},ghcr.io/${{ env. REPO_LOWER } }:${TAG}"
54+ TAGS="docker.io/${REPO_LOWER} :${TAG},ghcr.io/${REPO_LOWER}:${TAG}"
5555 elif [[ "${{ github.ref_type }}" == "tag" ]]; then
5656 # Git tag push
5757 TAG="${{ github.ref_name }}"
5858 TAG="${TAG#v}" # Remove v prefix
59- TAGS="docker.io/${{ env. REPO_LOWER }} :${TAG},ghcr.io/${{ env. REPO_LOWER } }:${TAG}"
59+ TAGS="docker.io/${REPO_LOWER} :${TAG},ghcr.io/${REPO_LOWER}:${TAG}"
6060 elif [[ "${{ github.ref }}" == "refs/heads/main" ]]; then
6161 # Main branch push
62- TAGS="docker.io/${{ env. REPO_LOWER }} :latest,ghcr.io/${{ env. REPO_LOWER } }:latest"
62+ TAGS="docker.io/${REPO_LOWER} :latest,ghcr.io/${REPO_LOWER}:latest"
6363 fi
6464
6565 echo "tags=${TAGS}" >> $GITHUB_OUTPUT
66+ echo "repo_lower=${REPO_LOWER}" >> $GITHUB_OUTPUT
6667 echo "Publishing tags: ${TAGS}"
6768
6869 - name : 🔑 Login to Docker Hub
8485 id : meta
8586 uses : docker/metadata-action@v5
8687 with :
87- images : ghcr.io/${{ env.REPO_LOWER }}
88+ images : ghcr.io/${{ steps.tags.outputs.repo_lower }}
8889 tags : |
8990 type=raw,value=${{ steps.tags.outputs.tags }}
9091 labels : |
0 commit comments