Skip to content

Sync

Sync #3936

Workflow file for this run

name: Sync
on:
schedule:
- cron: "1 * * * *"
workflow_dispatch:
jobs:
sync-images:
runs-on: ubuntu-latest
if: github.repository == 'DaoCloud/public-image-mirror'
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up crproxy
run: |
wget https://github.com/DaoCloud/crproxy/releases/download/v0.13.0-alpha.43/crproxy_linux_amd64 -O /usr/local/bin/crproxy && chmod +x /usr/local/bin/crproxy
- name: Sync Images to OSS&OBS
run: |
ORIGIN_IMAGE=$(echo "${MESSAGE}" | grep SYNC | awk '{print $2}' | head -n 1 | sed "s/\r//g")
/usr/local/bin/crproxy sync --max-warn 100 ${{ secrets.STORAGE_ARGS }} --list-from-file ./mirror.txt