Skip to content

Commit

Permalink
[ACTIONS] Run build once a day if change made that day
Browse files Browse the repository at this point in the history
  • Loading branch information
darthcloud committed Dec 14, 2024
1 parent 8b56c18 commit 66730ce
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
name: build
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
workflow_dispatch:
schedule:
- cron: '0 10 * * *'

jobs:
build:
Expand Down Expand Up @@ -36,6 +34,11 @@ jobs:
with:
submodules: recursive
fetch-depth: 0
- name: Cron needed check
if: github.event_name == 'schedule'
run: if [[ "$(git log --oneline --since '24 hours ago' | wc -l)" == "0" ]]; then gh run cancel ${{ github.run_id }}; gh run watch ${{ github.run_id }}; fi
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Build with ESP-IDF
shell: bash
run: |
Expand Down

0 comments on commit 66730ce

Please sign in to comment.