-
Notifications
You must be signed in to change notification settings - Fork 27
50 lines (43 loc) · 1.74 KB
/
periodic.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
---
# yamllint disable rule:line-length
# We want to have our active branches built periodically to ensure they continue
# to build correctly, and to pick up any updates to underlying packages/images.
# Unfortunately, GitHub only allows scheduled workflow runs against the
# "default" branch (main). This job, residing on the default branch, will
# trigger other jobs (across other branches) at a regular interval.
#
# Jobs triggered by this workflow:
# - Must have "workflow_dispatch" as a trigger method
# - Must either:
# - Be on the default branch OR
# - Have executed at least once previously
#
# The above conditions are met in our case since we're just trying to
# periodically trigger workflows that run with each PR/Push.
name: Periodic
on: # yamllint disable-line rule:truthy
schedule:
- cron: "15 6 * * 1" # 6:15 every Monday
workflow_dispatch: # Useful for testing, but not necessary
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions
permissions:
actions: write
contents: read
jobs:
trigger-workflows:
name: Trigger other workflows
runs-on: ubuntu-latest
steps:
# Must checkout source or gh can't figure out what to trigger
- name: Checkout source
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Trigger workflows
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
# Main development branch
gh workflow run --ref "master" "tests.yml"
# Active release branches
gh workflow run --ref "release-3.2" "tests.yml"
# Rebuilds of tagged containers
# gh workflow run --ref "v3.2.0" "tests.yml" # Disabled due to mdl config incompatibility