We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f375e4c commit c074cedCopy full SHA for c074ced
.github/workflows/1-first-codespace.yml
@@ -14,7 +14,26 @@ env:
14
STEP_2_FILE: ".github/steps/2-custom-image.md"
15
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
35
find_exercise:
36
+ needs: [stop_if_initial_commit]
37
name: Find Exercise Issue
38
uses: skills/exercise-toolkit/.github/workflows/[email protected]
39
0 commit comments