feat: 更新 Docker Pulls 歷史記錄工作流程,改用 Pull Request 方式提交更新
This commit is contained in:
parent
a6b59015bd
commit
d9ff841555
1 changed files with 17 additions and 7 deletions
24
.github/workflows/docker-pulls-history.yml
vendored
24
.github/workflows/docker-pulls-history.yml
vendored
|
|
@ -7,6 +7,7 @@ on:
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: write
|
||||||
|
pull-requests: write
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
track:
|
track:
|
||||||
|
|
@ -15,6 +16,8 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repo
|
- name: Checkout repo
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
ref: main
|
||||||
|
|
||||||
- name: Fetch Docker Hub pull count
|
- name: Fetch Docker Hub pull count
|
||||||
run: |
|
run: |
|
||||||
|
|
@ -115,10 +118,17 @@ jobs:
|
||||||
fs.writeFileSync(outPath, svg.trim());
|
fs.writeFileSync(outPath, svg.trim());
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
- name: Commit and push
|
- name: Create Pull Request
|
||||||
run: |
|
uses: peter-evans/create-pull-request@v7
|
||||||
git config user.name "github-actions"
|
with:
|
||||||
git config user.email "actions@github.com"
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
git add metrics
|
branch: chore/update-docker-pulls-metrics
|
||||||
git commit -m "chore(metrics): update docker pull history" || exit 0
|
delete-branch: true
|
||||||
git push
|
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
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue