Skip to content

Commit 3b371e1

Browse files
gichan-jangmyungjoo
authored andcommitted
[Action] Fix yocto daily build script.
Run yocto daily build when there is a change in 24 hours. Signed-off-by: Gichan Jang <[email protected]>
1 parent fdd738a commit 3b371e1

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

.github/workflows/yocto.yml

+5-1
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,14 @@ jobs:
3131
with:
3232
mode: build
3333

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
3436
- name: Check trigger event
3537
id: rebuild
3638
run: |
37-
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
3842
echo "rebuild=1" >> $GITHUB_OUTPUT
3943
else
4044
echo "rebuild=0" >> $GITHUB_OUTPUT

0 commit comments

Comments
 (0)