We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fdd738a commit 3b371e1Copy full SHA for 3b371e1
.github/workflows/yocto.yml
@@ -31,10 +31,14 @@ jobs:
31
with:
32
mode: build
33
34
+ - name: Get the number of new commits in 24 hours
35
+ run: echo "NEW_COMMIT_COUNTS=$(git log --oneline --since 24.hours | wc -l)" >> $GITHUB_ENV
36
- name: Check trigger event
37
id: rebuild
38
run: |
- if ${{ env.rebuild == '1' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' }}; then
39
+ if ${{ env.rebuild == '1' || github.event_name == 'workflow_dispatch' }}; then
40
+ echo "rebuild=1" >> $GITHUB_OUTPUT
41
+ elif ${{ github.event_name == 'schedule' && env.NEW_COMMIT_COUNTS > 0 }}; then
42
echo "rebuild=1" >> $GITHUB_OUTPUT
43
else
44
echo "rebuild=0" >> $GITHUB_OUTPUT
0 commit comments