27 lines
739 B
YAML
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 }}"
|