Skip to content

Commit

Permalink
Add new update list
Browse files Browse the repository at this point in the history
  • Loading branch information
wzshiming committed Dec 24, 2024
1 parent 0a11fde commit d5785dc
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/update-allows-list.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,18 @@ jobs:
- 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
- name: Update list (new)
run: |
LIST="$(cat ./allows.txt | jq -R -s -c '{"items": split("\n")[:-1]}')"
TOKEN="$(curl -X 'POST' \
'https://auth.m.daocloud.io/apis/v1/users/login' \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-d ${{ secrets.USER_LOGIN_DATA }} | jq -r .token)"
curl -f -X 'PUT' \
'https://auth.m.daocloud.io/apis/v1/registries/allow_images' \
-H 'Accept: application/json' \
-H "Authorization: Bearer ${TOKEN}" \
-H 'Content-Type: application/json' \
-d "${LIST}"

0 comments on commit d5785dc

Please sign in to comment.