File tree 1 file changed +11
-6
lines changed
1 file changed +11
-6
lines changed Original file line number Diff line number Diff line change 7
7
workflow_dispatch :
8
8
9
9
concurrency :
10
- group : ${{ github.workflow }}-${{ github.ref }}
10
+ group : ${{ github.workflow }}-${{ github.head_ref || github.ref_name }}
11
11
cancel-in-progress : true
12
12
13
13
env :
@@ -51,11 +51,16 @@ jobs:
51
51
- name : Update Dist
52
52
run : |
53
53
if [ "$(git diff --ignore-space-at-eol --text dist/ | wc -l)" -gt "0" ]; then
54
- git config user.name "github-actions[bot]"
55
- git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
56
- git add dist/
57
- git commit -m "chore(build): update dist"
58
- git push
54
+ if [[ "${{ github.ref_name }}" =~ ^refs/heads/ ]]; then
55
+ git config user.name "github-actions[bot]"
56
+ git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
57
+
58
+ git add dist/
59
+ git commit -m "chore(build): update dist"
60
+ git push
61
+ else
62
+ echo "Skipping push for non-branch commit"
63
+ fi
59
64
fi
60
65
env :
61
66
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
You can’t perform that action at this time.
0 commit comments