Skip to content

Periodic

Periodic #120

Workflow file for this run

---
# 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@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- 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