Jeonghan Daily Watchdog #2617
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Jeonghan Daily Watchdog | |
| on: | |
| workflow_run: | |
| workflows: | |
| - Jeonghan Daily Review Bot | |
| types: | |
| - completed | |
| schedule: | |
| # Independent heartbeat for GITHUB_TOKEN-created recovery runs, whose | |
| # completion does not reliably create a successor workflow_run event. | |
| - cron: "4,16,28,40,52 * * * *" | |
| workflow_dispatch: | |
| inputs: | |
| source_run_id: | |
| description: "Daily run id that completed successfully" | |
| required: true | |
| type: string | |
| source_run_number: | |
| description: "Daily run number that completed successfully" | |
| required: true | |
| type: string | |
| source_event: | |
| description: "Original Daily trigger event" | |
| required: true | |
| type: string | |
| source_conclusion: | |
| description: "Original Daily conclusion" | |
| required: true | |
| type: string | |
| source_actor: | |
| description: "Original Daily actor" | |
| required: true | |
| type: string | |
| permissions: | |
| contents: read | |
| actions: write | |
| jobs: | |
| watchdog: | |
| if: >- | |
| github.event_name == 'schedule' || | |
| (github.event_name == 'workflow_run' && | |
| github.event.workflow_run.head_branch == 'main' && | |
| (github.event.workflow_run.event == 'schedule' || | |
| github.event.workflow_run.event == 'push' || | |
| github.event.workflow_run.event == 'workflow_dispatch') && | |
| !(github.event.workflow_run.event == 'workflow_dispatch' && | |
| github.event.workflow_run.actor.login == 'github-actions[bot]')) || | |
| (github.event_name == 'workflow_dispatch' && | |
| github.actor == 'github-actions[bot]') | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 18 | |
| concurrency: | |
| group: jeonghan-daily-watchdog-main | |
| cancel-in-progress: true | |
| steps: | |
| - name: Checkout current production main | |
| uses: actions/checkout@v6 | |
| with: | |
| ref: main | |
| - name: Run bounded Daily watchdog | |
| env: | |
| GITHUB_TOKEN: ${{ github.token }} | |
| WATCHDOG_TRIGGER: ${{ github.event_name }} | |
| SOURCE_RUN_ID: ${{ github.event_name == 'workflow_run' && github.event.workflow_run.id || inputs.source_run_id }} | |
| SOURCE_RUN_NUMBER: ${{ github.event_name == 'workflow_run' && github.event.workflow_run.run_number || inputs.source_run_number }} | |
| SOURCE_EVENT: ${{ github.event_name == 'workflow_run' && github.event.workflow_run.event || inputs.source_event }} | |
| SOURCE_CONCLUSION: ${{ github.event_name == 'workflow_run' && github.event.workflow_run.conclusion || inputs.source_conclusion }} | |
| SOURCE_ACTOR: ${{ github.event_name == 'workflow_run' && github.event.workflow_run.actor.login || inputs.source_actor }} | |
| run: python tools/daily_watchdog.py |