From d9ff841555c7036a34348d0dc95bb84b4c108b9b Mon Sep 17 00:00:00 2001 From: Your Name Date: Mon, 26 Jan 2026 14:53:26 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=9B=B4=E6=96=B0=20Docker=20Pulls=20?= =?UTF-8?q?=E6=AD=B7=E5=8F=B2=E8=A8=98=E9=8C=84=E5=B7=A5=E4=BD=9C=E6=B5=81?= =?UTF-8?q?=E7=A8=8B=EF=BC=8C=E6=94=B9=E7=94=A8=20Pull=20Request=20?= =?UTF-8?q?=E6=96=B9=E5=BC=8F=E6=8F=90=E4=BA=A4=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/docker-pulls-history.yml | 24 +++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/.github/workflows/docker-pulls-history.yml b/.github/workflows/docker-pulls-history.yml index 5da1cf4..a71b267 100644 --- a/.github/workflows/docker-pulls-history.yml +++ b/.github/workflows/docker-pulls-history.yml @@ -7,6 +7,7 @@ on: permissions: contents: write + pull-requests: write jobs: track: @@ -15,6 +16,8 @@ jobs: steps: - name: Checkout repo uses: actions/checkout@v4 + with: + ref: main - name: Fetch Docker Hub pull count run: | @@ -115,10 +118,17 @@ jobs: fs.writeFileSync(outPath, svg.trim()); EOF - - name: Commit and push - run: | - git config user.name "github-actions" - git config user.email "actions@github.com" - git add metrics - git commit -m "chore(metrics): update docker pull history" || exit 0 - git push + - name: Create Pull Request + uses: peter-evans/create-pull-request@v7 + with: + token: ${{ secrets.GITHUB_TOKEN }} + branch: chore/update-docker-pulls-metrics + delete-branch: true + commit-message: "chore(metrics): update docker pull history" + title: "chore(metrics): update docker pull history" + body: | + 自動更新 Docker Pull 統計資料 + + - 更新 `metrics/docker-pulls.csv` + - 更新 `metrics/docker-pulls-history.svg` + labels: automated,metrics