Skip to content

Commit e014395

Browse files
committed
fix(workflows): 重构 GitHub Actions 工作流配置
- 重构 CONTRIBUTORS.yml 工作流,添加分支触发和条件判断,优化任务结构。 - 为 create_release.yml 工作流添加仓库条件判断,确保仅在目标仓库运行。
1 parent a8b73c5 commit e014395

2 files changed

Lines changed: 25 additions & 11 deletions

File tree

.github/workflows/CONTRIBUTORS.yml

Lines changed: 24 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,25 @@
1-
- name: Generate Contributors Images
2-
uses: jaywcjlove/github-action-contributors@main
3-
id: contributors
4-
with:
5-
filter-author: (renovate\[bot\]|renovate-bot|dependabot\[bot\])
6-
avatarSize: 42
1+
name: Generate Contributors Images
72

8-
- name: Modify README.md
9-
uses: jaywcjlove/github-action-modify-file-content@main
10-
with:
11-
path: README.md
12-
body: '${{steps.contributors.outputs.htmlList}}'
3+
on:
4+
push:
5+
branches:
6+
- main
7+
workflow_dispatch:
8+
9+
jobs:
10+
check-release:
11+
if: github.repository == 'anghunk/linuxdo-scripts'
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Generate Contributors Images
15+
uses: jaywcjlove/github-action-contributors@main
16+
id: contributors
17+
with:
18+
filter-author: (renovate\[bot\]|renovate-bot|dependabot\[bot\])
19+
avatarSize: 42
20+
21+
- name: Modify README.md
22+
uses: jaywcjlove/github-action-modify-file-content@main
23+
with:
24+
path: README.md
25+
body: '${{steps.contributors.outputs.htmlList}}'

.github/workflows/create_release.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ on:
88

99
jobs:
1010
check-release:
11+
if: github.repository == 'anghunk/linuxdo-scripts'
1112
runs-on: ubuntu-latest
1213
steps:
1314
- name: Checkout code

0 commit comments

Comments
 (0)