mirror of
https://github.com/Websoft9/websoft9.git
synced 2025-02-02 17:08:38 +08:00
Update dockerhub_proxy.yml
This commit is contained in:
parent
b8f5864601
commit
662d55998b
17
.github/workflows/dockerhub_proxy.yml
vendored
17
.github/workflows/dockerhub_proxy.yml
vendored
@ -12,22 +12,19 @@ jobs:
|
|||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Build cloudflare.js for Dockerhub proxy
|
- name: Download Markdown file and update cloudflare.js
|
||||||
run: |
|
run: |
|
||||||
cd docker
|
cd docker
|
||||||
curl -o https://raw.githubusercontent.com/Websoft9/doc.websoft9.com/refs/heads/main/docs/reference/_include/dockerhub-proxy.md
|
curl -o dockerhub-proxy.md https://raw.githubusercontent.com/Websoft9/doc.websoft9.com/refs/heads/main/docs/reference/_include/dockerhub-proxy.md
|
||||||
echo "Insert proxy lists to cloudflare.js"
|
|
||||||
|
|
||||||
- name: Extract URLs from Markdown and update cloudflare.js
|
# 提取 Markdown 文件中的 URL
|
||||||
run: |
|
urls=$(grep -Eo 'https://[a-zA-Z0-9./?=_-]*' dockerhub-proxy.md | tr '\n' ',' | sed 's/,$//')
|
||||||
# Extract URLs from the downloaded Markdown file
|
|
||||||
urls=$(grep -Eo 'https://[a-zA-Z0-9./?=_-]*' docker/dockerhub-proxy.md | tr '\n' ',' | sed 's/,$//')
|
|
||||||
|
|
||||||
# Create the new backends array
|
# 创建新的 backends 数组
|
||||||
new_backends="const backends = [${urls}]"
|
new_backends="const backends = [${urls}]"
|
||||||
|
|
||||||
# Update cloudflare.js with the new backends array
|
# 更新 cloudflare.js 文件中的 backends 数组
|
||||||
sed -i "s|const backends = \[.*\]|${new_backends}|" docker/cloudflare.js
|
sed -i "s|const backends = \[.*\]|${new_backends}|" cloudflare.js
|
||||||
|
|
||||||
- name: Set compatibility date
|
- name: Set compatibility date
|
||||||
id: set-date
|
id: set-date
|
||||||
|
Loading…
Reference in New Issue
Block a user