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:
|
env:
|
||||||
REGISTRY: forgejo.adriahub.de
|
REGISTRY: forgejo.adriahub.de
|
||||||
|
REGISTRY_MIRROR: forgejo.daddelolymp.de
|
||||||
IMAGE: root/gaming-hub
|
IMAGE: root/gaming-hub
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|
@ -58,7 +59,7 @@ jobs:
|
||||||
${{ env.REGISTRY }}/${{ env.IMAGE }}:latest
|
${{ env.REGISTRY }}/${{ env.IMAGE }}:latest
|
||||||
fi
|
fi
|
||||||
|
|
||||||
- name: Push to registry
|
- name: Push to registry (adriahub)
|
||||||
run: |
|
run: |
|
||||||
echo "${{ secrets.REGISTRY_PASSWORD }}" | docker login ${{ env.REGISTRY }} -u root --password-stdin
|
echo "${{ secrets.REGISTRY_PASSWORD }}" | docker login ${{ env.REGISTRY }} -u root --password-stdin
|
||||||
docker push ${{ env.REGISTRY }}/${{ env.IMAGE }}:${{ steps.vars.outputs.tag }}
|
docker push ${{ env.REGISTRY }}/${{ env.IMAGE }}:${{ steps.vars.outputs.tag }}
|
||||||
|
|
@ -66,6 +67,18 @@ jobs:
|
||||||
docker push ${{ env.REGISTRY }}/${{ env.IMAGE }}:latest
|
docker push ${{ env.REGISTRY }}/${{ env.IMAGE }}:latest
|
||||||
fi
|
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:
|
deploy:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: build
|
needs: build
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue