fix: ensure GHCR image tags use lowercase repository owner

This commit is contained in:
RiverOnVenus
2025-07-17 23:38:07 +08:00
parent 880b6282c0
commit e4d8a03071

View File

@@ -26,6 +26,10 @@ jobs:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set lowercase repository owner
id: lowercase
run: echo "owner=$(echo '${{ github.repository_owner }}' | tr '[:upper:]' '[:lower:]')" >> "$GITHUB_OUTPUT"
- name: Build and push
uses: docker/build-push-action@v5
with:
@@ -34,8 +38,8 @@ jobs:
push: true
platforms: linux/amd64,linux/arm64
tags: |
ghcr.io/${{ github.repository_owner }}/moontv:latest
ghcr.io/${{ github.repository_owner }}/moontv:${{ github.sha }}
ghcr.io/${{ steps.lowercase.outputs.owner }}/moontv:latest
ghcr.io/${{ steps.lowercase.outputs.owner }}/moontv:${{ github.sha }}
cache-from: type=gha
cache-to: type=gha,mode=max
@@ -45,4 +49,4 @@ jobs:
token: ${{ secrets.GITHUB_TOKEN }}
repository: ${{ github.repository }}
retain_days: 0
keep_minimum_runs: 2
keep_minimum_runs: 2