From 20265a2164e0bc36f7878bc43a2c5338c9c0c875 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E7=92=9F?= Date: Wed, 23 Oct 2024 13:49:38 +0800 Subject: [PATCH 1/3] Update dockerhub_proxy.yml --- .github/workflows/dockerhub_proxy.yml | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/.github/workflows/dockerhub_proxy.yml b/.github/workflows/dockerhub_proxy.yml index 54ce09d9..206c2d2c 100644 --- a/.github/workflows/dockerhub_proxy.yml +++ b/.github/workflows/dockerhub_proxy.yml @@ -12,20 +12,10 @@ jobs: - name: Checkout uses: actions/checkout@v4 - - name: Download Markdown file and update cloudflare.js + - name: Download _worker.js run: | - cd docker - curl -o dockerhub-proxy.md https://raw.githubusercontent.com/Websoft9/doc.websoft9.com/refs/heads/main/docs/reference/_include/dockerhub-proxy.md + curl -o _worker.js https://github.com/cmliu/CF-Workers-docker.io/blob/main/_worker.js - # 提取 Markdown 文件中的 URL - urls=$(grep -Eo 'https://[a-zA-Z0-9./?=_-]*' dockerhub-proxy.md | sed 's/^/"/; s/$/"/' | tr '\n' ',' | sed 's/,$//') - - # 创建新的 backends 数组 - new_backends="const backends = [${urls}]" - - # 更新 cloudflare.js 文件中的 backends 数组 - sed -i "s|var backends = \[.*\]|${new_backends}|" cloudflare.js - - name: Set compatibility date id: set-date run: echo "COMPATIBILITY_DATE=$(date +%Y-%m-%d)" >> $GITHUB_ENV @@ -35,4 +25,4 @@ jobs: with: apiToken: ${{ secrets.EDIT_CLOUDFLARE_WORKERS }} accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} - command: deploy docker/cloudflare.js --name dockerhub --compatibility-date ${{ env.COMPATIBILITY_DATE }} + command: deploy _worker.js --name test --compatibility-date ${{ env.COMPATIBILITY_DATE }} From 314857b173c7a94390bd4b6f0221b52587ec611a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E7=92=9F?= Date: Wed, 23 Oct 2024 13:57:39 +0800 Subject: [PATCH 2/3] Update dockerhub_proxy.yml --- .github/workflows/dockerhub_proxy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dockerhub_proxy.yml b/.github/workflows/dockerhub_proxy.yml index 206c2d2c..8fd40615 100644 --- a/.github/workflows/dockerhub_proxy.yml +++ b/.github/workflows/dockerhub_proxy.yml @@ -14,7 +14,7 @@ jobs: - name: Download _worker.js run: | - curl -o _worker.js https://github.com/cmliu/CF-Workers-docker.io/blob/main/_worker.js + curl -o _worker.js https://raw.githubusercontent.com/cmliu/CF-Workers-docker.io/main/_worker.js - name: Set compatibility date id: set-date From 719549348a5ac96119982c2b0df9660f90bb80b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E7=92=9F?= Date: Wed, 23 Oct 2024 14:00:17 +0800 Subject: [PATCH 3/3] Update dockerhub_proxy.yml --- .github/workflows/dockerhub_proxy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dockerhub_proxy.yml b/.github/workflows/dockerhub_proxy.yml index 8fd40615..28112573 100644 --- a/.github/workflows/dockerhub_proxy.yml +++ b/.github/workflows/dockerhub_proxy.yml @@ -25,4 +25,4 @@ jobs: with: apiToken: ${{ secrets.EDIT_CLOUDFLARE_WORKERS }} accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} - command: deploy _worker.js --name test --compatibility-date ${{ env.COMPATIBILITY_DATE }} + command: deploy _worker.js --name dockerhub --compatibility-date ${{ env.COMPATIBILITY_DATE }}