28 lines
888 B
YAML
28 lines
888 B
YAML
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.154/crproxy_linux_amd64 -O /usr/local/bin/crproxy && chmod +x /usr/local/bin/crproxy
|
|
|
|
- name: Sync Images to OSS&OBS
|
|
run: |
|
|
/usr/local/bin/crproxy sync --max-warn 100 ${{ secrets.STORAGE_ARGS }} --user '${{ secrets.OCI_USER }}' --list-from-file ./mirror.txt
|
|
|
|
- name: Quick Sync Images to OSS&OBS
|
|
run: |
|
|
/usr/local/bin/crproxy sync --max-warn 10 ${{ secrets.STORAGE_ARGS }} --user '${{ secrets.OCI_USER }}' --list-from-file ./mirror-quick.txt --quick
|