Support update list
This commit is contained in:
parent
b23326a1be
commit
a3024e6794
|
@ -0,0 +1,27 @@
|
|||
name: Update allows list
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- allows.txt
|
||||
workflow_dispatch:
|
||||
|
||||
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
|
||||
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 socks5h://127.0.0.1:8080 -v http://m.daocloud.io/v2/ || exit 1
|
||||
|
||||
- name: Update list
|
||||
run: |
|
||||
curl -v -f --proxy socks5h://127.0.0.1:8080 -X PUT http://crmirror:8080/internal/api/allows -T ./allows.txt
|
|
@ -0,0 +1,27 @@
|
|||
name: Update privileged list
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- privileged.txt
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
update-privileged-list:
|
||||
if: github.repository == 'DaoCloud/public-image-mirror'
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
- name: Start Proxy
|
||||
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 socks5h://127.0.0.1:8080 -v http://m.daocloud.io/v2/ || exit 1
|
||||
|
||||
- name: Update list
|
||||
run: |
|
||||
curl -v -f --proxy socks5h://127.0.0.1:8080 -X PUT http://crmirror:8080/internal/api/privileged -T ./privileged.txt
|
Loading…
Reference in New Issue