ci: mirror Docker images to daddelolymp registry
After building and pushing to adriahub, the CI pipeline now also tags and pushes images to forgejo.daddelolymp.de as a backup. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
bf69827dbd
commit
24e8a6b3f7
1 changed files with 14 additions and 1 deletions
|
|
@ -6,6 +6,7 @@ on:
|
|||
|
||||
env:
|
||||
REGISTRY: forgejo.adriahub.de
|
||||
REGISTRY_MIRROR: forgejo.daddelolymp.de
|
||||
IMAGE: root/gaming-hub
|
||||
|
||||
jobs:
|
||||
|
|
@ -58,7 +59,7 @@ jobs:
|
|||
${{ env.REGISTRY }}/${{ env.IMAGE }}:latest
|
||||
fi
|
||||
|
||||
- name: Push to registry
|
||||
- name: Push to registry (adriahub)
|
||||
run: |
|
||||
echo "${{ secrets.REGISTRY_PASSWORD }}" | docker login ${{ env.REGISTRY }} -u root --password-stdin
|
||||
docker push ${{ env.REGISTRY }}/${{ env.IMAGE }}:${{ steps.vars.outputs.tag }}
|
||||
|
|
@ -66,6 +67,18 @@ jobs:
|
|||
docker push ${{ env.REGISTRY }}/${{ env.IMAGE }}:latest
|
||||
fi
|
||||
|
||||
- name: Mirror to registry (daddelolymp)
|
||||
run: |
|
||||
echo "${{ secrets.REGISTRY_DADDELOLYMP_PASSWORD }}" | docker login ${{ env.REGISTRY_MIRROR }} -u root --password-stdin
|
||||
docker tag ${{ env.REGISTRY }}/${{ env.IMAGE }}:${{ steps.vars.outputs.tag }} \
|
||||
${{ env.REGISTRY_MIRROR }}/${{ env.IMAGE }}:${{ steps.vars.outputs.tag }}
|
||||
docker push ${{ env.REGISTRY_MIRROR }}/${{ env.IMAGE }}:${{ steps.vars.outputs.tag }}
|
||||
if [ "${GITHUB_REF_NAME}" = "main" ]; then
|
||||
docker tag ${{ env.REGISTRY }}/${{ env.IMAGE }}:latest \
|
||||
${{ env.REGISTRY_MIRROR }}/${{ env.IMAGE }}:latest
|
||||
docker push ${{ env.REGISTRY_MIRROR }}/${{ env.IMAGE }}:latest
|
||||
fi
|
||||
|
||||
deploy:
|
||||
runs-on: ubuntu-latest
|
||||
needs: build
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue