File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change 14
14
STEP_2_FILE : " .github/steps/2-custom-image.md"
15
15
16
16
jobs :
17
+ stop_if_initial_commit :
18
+ name : Stop workflow if initial commit
19
+ runs-on : ubuntu-latest
20
+ if : |
21
+ github.event_name == 'push' &&
22
+ github.ref == 'refs/heads/main' &&
23
+ startsWith(github.event.head_commit.message, 'Initial commit')
24
+
25
+ steps :
26
+ - name : Checkout
27
+ uses : actions/checkout@v4
28
+
29
+ - name : Cancel workflow if there is only 1 commit in history
30
+ run : |
31
+ if [ "$(git rev-list --count HEAD)" -eq 1 ]; then
32
+ gh run cancel ${{ github.run_id }}
33
+ fi
34
+
17
35
find_exercise :
36
+ needs : [stop_if_initial_commit]
18
37
name : Find Exercise Issue
19
38
uses : skills/exercise-toolkit/.github/workflows/find-exercise-issue.yml@v0.5.0
20
39
You can’t perform that action at this time.
0 commit comments