File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Expand file tree Collapse file tree 1 file changed +21
-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
+ env :
31
+ GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
32
+ run : |
33
+ if [ "$(git rev-list --count HEAD)" -eq 1 ]; then
34
+ gh run cancel ${{ github.run_id }}
35
+ fi
36
+
17
37
find_exercise :
38
+ needs : [stop_if_initial_commit]
18
39
name : Find Exercise Issue
19
40
uses :
skills/exercise-toolkit/.github/workflows/[email protected]
20
41
You can’t perform that action at this time.
0 commit comments