From d24b0aa1599ba4f39356690c489d9d7cb60e61da Mon Sep 17 00:00:00 2001 From: Shiming Zhang Date: Tue, 18 Jan 2022 15:33:43 +0800 Subject: [PATCH] Create manual-sync.yml --- .github/workflows/manual-sync.yml | 35 +++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/manual-sync.yml diff --git a/.github/workflows/manual-sync.yml b/.github/workflows/manual-sync.yml new file mode 100644 index 0000000..dcc7936 --- /dev/null +++ b/.github/workflows/manual-sync.yml @@ -0,0 +1,35 @@ +name: Manual Sync + +on: + workflow_call: + inputs: + image: + description: 'Manually synchronize a image' + required: true + type: string + +jobs: + sync-images: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v2 + - name: Start Proxy + env: + only_proxy: ".m.daocloud.io" + run: | + wget https://github.com/wzshiming/bridge/releases/download/v0.7.10/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: Override mirror.txt + run: | + echo ${{ inputs.image }} > mirror.txt + - name: Sync Images + env: + INCREMENTAL: "true" + QUICKLY: "true" + SYNC: "true" + PARALLET: "5" + http_proxy: socks5://127.0.0.1:8080 + https_proxy: socks5://127.0.0.1:8080 + run: | + ./hack/diff.sh