File tree Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Expand file tree Collapse file tree 1 file changed +25
-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
+ check_commits_count :
18
+ name : Check commits count
19
+ runs-on : ubuntu-latest
20
+ if : |
21
+ github.event_name == 'push' &&
22
+ github.ref == 'refs/heads/main'
23
+
24
+ outputs :
25
+ total_commits : ${{ steps.get_commit_counts.outputs.total_commits }}
26
+
27
+ steps :
28
+ - name : Checkout
29
+ uses : actions/checkout@v4
30
+ with :
31
+ fetch-depth : 0 # Fetch all history for all branches and tags
32
+
33
+ - name : Get commit count
34
+ id : get_commit_counts
35
+ run : |
36
+ total_commits=$(git rev-list --all --count)
37
+ echo "Total commits in the repository: $total_commits"
38
+ echo "total_commits=$total_commits" >> $GITHUB_OUTPUT
39
+
17
40
find_exercise :
41
+ needs : [check_commits_count]
42
+ if : needs.check_commits_count.outputs.total_commits > 1
18
43
name : Find Exercise Issue
19
44
uses : skills/exercise-toolkit/.github/workflows/find-exercise-issue.yml@v0.5.0
20
45
You can’t perform that action at this time.
0 commit comments