File tree Expand file tree Collapse file tree 1 file changed +22
-1
lines changed Expand file tree Collapse file tree 1 file changed +22
-1
lines changed Original file line number Diff line number Diff line change 21
21
- README.md
22
22
23
23
jobs :
24
+
25
+ short-circuit :
26
+ runs-on : ubuntu-latest
27
+ outputs :
28
+ should_skip : ${{ steps.check.outputs.should_skip }}
29
+ steps :
30
+ - name : Check if workflow should be skipped
31
+ id : check
32
+ run : |
33
+ echo "Commit message: ${{ github.event.head_commit.message }}"
34
+ echo "Actor: ${{ github.actor }}"
35
+
36
+ # Check for [skip ci] in commit message or actor
37
+ if [[ "${{ github.actor }}" == "auto-pusher" ]] || [[ "${{ github.event.head_commit.message }}" == *"[skip ci]"* ]]; then
38
+ echo "should_skip=true" >> $GITHUB_OUTPUT
39
+ else
40
+ echo "should_skip=false" >> $GITHUB_OUTPUT
41
+ fi
42
+
24
43
build-artifacts :
25
44
runs-on : ubuntu-22.04
45
+ if : needs.short-circuit.outputs.should_skip == 'false'
26
46
27
47
steps :
28
48
- name : Checkout
29
49
uses : actions/checkout@v4
30
50
with :
31
51
ref : ' master'
52
+ token : ${{ secrets.GH_ACCESS_TOKEN }}
32
53
33
54
- name : Setup Hugo (Extended)
34
55
uses : peaceiris/actions-hugo@v2
62
83
63
84
- uses : stefanzweifel/git-auto-commit-action@v5
64
85
with :
65
- commit_message : Build Academy
86
+ commit_message : " Build Academy [skip ci] "
66
87
commit_options : ' --signoff'
67
88
branch : master
68
89
commit_user_name : l5io
You can’t perform that action at this time.
0 commit comments