File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -3,11 +3,11 @@ name: Update Share Links
33on :
44 push :
55 paths :
6- - " *.scripting" # 根目录
7- - " **/*.scripting" # 子目录
6+ - " *.scripting"
7+ - " **/*.scripting"
88 branches :
99 - main
10- workflow_dispatch : # 支持手动触发
10+ workflow_dispatch :
1111
1212jobs :
1313 build :
3333 git config user.name "${GITHUB_ACTOR}"
3434 git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
3535 git add README.md
36- git commit -m "chore: auto update share links" || echo "No changes"
37- git push
36+ git diff-index --quiet HEAD || git commit -m "chore: auto update share links"
37+ # 使用 token 进行推送
38+ git push "https://${GITHUB_ACTOR}:${GITHUB_TOKEN}@github.com/${{ github.repository }}.git" HEAD:main
3839 env :
3940 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
You can’t perform that action at this time.
0 commit comments