oci-mirror/.forgejo/workflows/mirror.yml
Thorsten Schubert 18a2105f7c
All checks were successful
/ mirror (push) Successful in 2m59s
Pull images daily at 4 am
2024-08-10 13:15:14 +02:00

27 lines
739 B
YAML

on:
schedule:
- cron: '0 4 * * *'
push:
jobs:
mirror:
if: ${{ secrets.MIRROR_TOKEN != '' }}
runs-on: docker
container:
image: 'quay.io/skopeo/stable:v1'
steps:
- name: Mirror container images
shell: bash
run: |
skopeo login --username strom --password '${{ secrets.MIRROR_TOKEN }}' betaco.de
while IFS= read -r src; do
echo "Processing: ${src}"
dst=${src##*/}
echo $dst
if [[ -n "${dst// }" ]]; then
skopeo copy \
--preserve-digests \
docker://$src \
docker://betaco.de/mirror/$dst --multi-arch=all
fi
done <<< "${{ vars.IMAGES }}"