Clean job and update readme (#342)

This commit is contained in:
Shiming Zhang
2023-08-25 11:36:52 +08:00
committed by GitHub
parent 2a78cf1d76
commit 1e98edd984
5 changed files with 8 additions and 92 deletions

View File

@@ -3,7 +3,7 @@ on:
workflow_dispatch:
schedule:
- cron: "0 3 * * *"
- cron: "0 4 * * *"
jobs:
check:

View File

@@ -1,45 +0,0 @@
name: "Deep Check"
on:
workflow_dispatch:
schedule:
- cron: "0 5 * * *"
jobs:
check:
if: github.repository == 'DaoCloud/public-image-mirror'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Start Proxy
env:
only_proxy: "m.daocloud.io"
run: |
wget https://github.com/wzshiming/bridge/releases/download/v0.7.13/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: Check
env:
INCREMENTAL: "true"
QUICKLY: "true"
QUICKLY_PATTERN: '[0-9]+(\.[0-9]+){2}|[0-9a-fA-F]{16}'
PARALLET: "4"
http_proxy: socks5://127.0.0.1:8080
https_proxy: socks5://127.0.0.1:8080
run: |
./hack/diff.sh
- name: Update badge
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BADGE_PREFIX: "git://${{ github.repository }}/gh-pages"
run: |
wget https://github.com/wzshiming/putingh/releases/download/v0.6.3/putingh_linux_amd64 -O /usr/local/bin/putingh && chmod +x /usr/local/bin/putingh
./hack/badge.sh
GH_TOKEN="${GH_TOKEN}" putingh "${BADGE_PREFIX}/daocloud-deep-sync-badge.svg" badge.svg
GH_TOKEN="${GH_TOKEN}" putingh "${BADGE_PREFIX}/daocloud-deep-sync.log" sync.log
- name: Stats the number of not sync images
run: |
./hack/stats-not-sync.sh sync.log

View File

@@ -1,36 +0,0 @@
name: Deep Sync
on:
schedule:
- cron: "0 17,21,13 * * *"
workflow_dispatch:
jobs:
sync-images:
if: github.repository == 'DaoCloud/public-image-mirror'
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.13/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: Sync Images
env:
INCREMENTAL: "true"
QUICKLY: "true"
QUICKLY_PATTERN: '[0-9]+(\.[0-9]+){2}|[0-9a-fA-F]{16}'
SYNC: "true"
PARALLET: "2"
http_proxy: socks5://127.0.0.1:8080
https_proxy: socks5://127.0.0.1:8080
run: |
./hack/diff.sh

View File

@@ -2,7 +2,7 @@ name: Sync
on:
schedule:
- cron: "0 19,23,11,15 * * *"
- cron: "0 10,22 * * *"
workflow_dispatch: