Trigger update workflows on all branches #1465
This file contains 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: Trigger update workflows on all branches | |
on: | |
schedule: | |
- cron: '35 10 * * *' # Run at 5:35 AM EST | 10:35 AM UTC (Github Actions runs on UTC, no Daylight Savings Time changes are accounted for in this trigger) | |
- cron: '0 9,15,21 * 3-4 0,4,5,6' # Run at 09:00, 15:00 and 21:00 on Sunday, Thursday, Friday, and Saturday in every month from March through April. (Github Actions terminates runners that run longer than 6hrs) | |
issues: | |
types: [opened] | |
workflow_dispatch: | |
jobs: | |
trigger-workflows: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check cron trigger | |
id: cron_check | |
run: | | |
echo "Cron trigger: ${{ github.event_name }}" | |
- name: Trigger TBA workflows | |
if: ${{ github.event_name == 'schedule' && github.event.schedule == '35 10 * * *' || github.event_name == 'workflow_dispatch'}} | |
uses: benc-uk/workflow-dispatch@v1 | |
with: | |
ref: gh-actions-tba-data-backend | |
workflow: 56043978 | |
- name: Trigger TBA current workflow | |
if: ${{ github.event_name == 'schedule' && github.event.schedule == '0 9,15,21 * 3-4 0,4,5,6' || github.event_name == 'workflow_dispatch' || github.event_name == 'issues' }} | |
uses: benc-uk/workflow-dispatch@v1 | |
with: | |
ref: gh-actions-tba-data-backend | |
workflow: 56043979 | |
- name: Trigger Google Calendar workflow | |
if: ${{ github.event_name == 'schedule' && github.event.schedule == '35 10 * * *' || github.event_name == 'workflow_dispatch' }} | |
uses: benc-uk/workflow-dispatch@v1 | |
with: | |
ref: google-api-backend | |
workflow: 57165542 | |
- name: Close Issue | |
if: ${{github.event_name == 'issues'}} | |
uses: peter-evans/close-issue@v3 | |
with: | |
issue-number: ${{ github.event.issue.number }} | |
comment: Github actions trigger fired, Auto closing | |
labels: | | |
Automation | |