Skip to content

Manual Deep Sync

Manual Deep Sync #260

name: Manual Deep Sync
on:
workflow_dispatch:
inputs:
image:
description: 'Manually synchronize a image'
required: true
type: string
jobs:
sync-images:
if: github.repository == 'DaoCloud/public-image-mirror'
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Start Proxy
env:
only_proxy: "m.daocloud.io"
run: |
wget https://github.com/wzshiming/bridge/releases/download/v0.9.0/bridge_linux_amd64 -O /usr/local/bin/bridge && chmod +x /usr/local/bin/bridge
nohup /usr/local/bin/bridge -b :8080 -p - ${{ secrets.PROTOCOL }} 2>/dev/null &
- name: Check Proxy
run: |
curl -v http://127.0.0.1:8080 || exit 1
curl -f --proxy 127.0.0.1:8080 -v http://m.daocloud.io/v2/ || exit 1
- name: Override mirror.txt
run: |
echo ${{ github.event.inputs.image }} > mirror.txt
- name: Set up skopeo
run: |
wget https://github.com/lework/skopeo-binary/releases/download/v1.13.3/skopeo-linux-amd64 -O /usr/local/bin/skopeo && chmod +x /usr/local/bin/skopeo
skopeo --version
- name: Sync Images
env:
INCREMENTAL: "true"
SYNC: "true"
PARALLET: "1"
http_proxy: socks5://127.0.0.1:8080
https_proxy: socks5://127.0.0.1:8080
run: |
./hack/diff.sh