File tree Expand file tree Collapse file tree 2 files changed +12
-11
lines changed
Expand file tree Collapse file tree 2 files changed +12
-11
lines changed Original file line number Diff line number Diff line change 2222
2323env :
2424 REPO_NAME : ${{ github.repository }}
25+ REPO_LOWER : ${{ github.repository_owner }}/networking-toolbox
2526
2627jobs :
2728 build :
@@ -50,15 +51,15 @@ jobs:
5051 if [[ "${{ github.event_name }}" == "workflow_dispatch" && -n "${{ inputs.tag }}" ]]; then
5152 # Manual dispatch with custom tag
5253 TAG="${{ inputs.tag }}"
53- TAGS="docker.io/${{ env.REPO_NAME }}:${TAG},ghcr.io/${{ env.REPO_NAME }}:${TAG}"
54+ TAGS="docker.io/${{ env.REPO_LOWER }}:${TAG},ghcr.io/${{ env.REPO_LOWER }}:${TAG}"
5455 elif [[ "${{ github.ref_type }}" == "tag" ]]; then
5556 # Git tag push
5657 TAG="${{ github.ref_name }}"
5758 TAG="${TAG#v}" # Remove v prefix
58- TAGS="docker.io/${{ env.REPO_NAME }}:${TAG},ghcr.io/${{ env.REPO_NAME }}:${TAG}"
59+ TAGS="docker.io/${{ env.REPO_LOWER }}:${TAG},ghcr.io/${{ env.REPO_LOWER }}:${TAG}"
5960 elif [[ "${{ github.ref }}" == "refs/heads/main" ]]; then
6061 # Main branch push
61- TAGS="docker.io/${{ env.REPO_NAME }}:latest,ghcr.io/${{ env.REPO_NAME }}:latest"
62+ TAGS="docker.io/${{ env.REPO_LOWER }}:latest,ghcr.io/${{ env.REPO_LOWER }}:latest"
6263 fi
6364
6465 echo "tags=${TAGS}" >> $GITHUB_OUTPUT
8384 id : meta
8485 uses : docker/metadata-action@v5
8586 with :
86- images : ghcr.io/${{ env.REPO_NAME }}
87+ images : ghcr.io/${{ env.REPO_LOWER }}
8788 tags : |
8889 type=raw,value=${{ steps.tags.outputs.tags }}
8990 labels : |
Original file line number Diff line number Diff line change 2525 repo : { description: 'Repository name (default: current repo name)' }
2626
2727jobs :
28- codeberg :
28+ mirror :
2929 runs-on : ubuntu-latest
3030 env : # Get values for target repo from inputs, env vars, or fallback to defaults
3131 MIRROR_HOST :
${{ inputs.host || vars.MIRROR_HOST || '[email protected] ' }} 3232 MIRROR_USER : ${{ inputs.user || vars.MIRROR_USER || 'alicia' }}
3333 MIRROR_REPO : ${{ inputs.repo || vars.MIRROR_REPO || github.event.repository.name }}
3434 HAS_SSH : ${{ secrets.MIRROR_SSH != '' }}
3535 steps :
36- - name : Cancel if SSH key not set
36+ - name : ⏭️ Cancel if SSH key not set
3737 if : env.HAS_SSH != 'true'
3838 run : echo "::warning::MIRROR_SSH secret not set" && exit 1
3939
40- - name : Checkout source repository
40+ - name : ⤵️ Checkout source repository
4141 uses : actions/checkout@v4
4242 with : { fetch-depth: 0 }
4343
44- - name : Mirror repository to target
44+ - name : 🔁 Mirror repository to target
4545 id : mirror
4646 run : |
4747 set -euo pipefail
6161 git push mirror --tags
6262 } |& tee "$LOG"
6363
64- - name : Summarize
64+ - name : ⤵️ Summarize
6565 if : always()
6666 continue-on-error : true
6767 run : |
7575 fi
7676 if [ "${{ steps.mirror.outcome }}" = "success" ]; then
7777 {
78- echo "✅ **Completed**.<br>_You can now access the repository at_ \`${TARGET}\` 🥳"
79- echo; echo '``` '; (tail -n 200 "$LOG" || true); echo '``` '
78+ echo "✅ **Completed**.<br>_You can now access the repository at_ \`${TARGET}\` 🥳<br> "
79+ echo; echo '<details><summary>Output</summary><pre> '; (tail -n 200 "$LOG" || true); echo '</pre></details> '
8080 } >> "$GITHUB_STEP_SUMMARY"
8181 else
8282 {
You can’t perform that action at this time.
0 commit comments