From fcee3b491a3f2ac134ef361b480a444673bae3bf Mon Sep 17 00:00:00 2001 From: William Jamieson Date: Mon, 20 Feb 2023 10:45:47 -0500 Subject: [PATCH] Backport PR #1391: Add a scheduled workflow --- .github/workflows/ci.yml | 3 --- .github/workflows/downstream.yml | 5 ----- .github/workflows/s390x.yml | 5 ----- .github/workflows/scheduled.yml | 30 ++++++++++++++++++++++++++++++ 4 files changed, 30 insertions(+), 13 deletions(-) create mode 100644 .github/workflows/scheduled.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 552ed5381..a03d67e6b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,9 +2,6 @@ name: CI on: workflow_dispatch: - schedule: - # Run every Monday at 6am UTC - - cron: '0 6 * * 1' push: branches: - master diff --git a/.github/workflows/downstream.yml b/.github/workflows/downstream.yml index dc641c644..bc65d3a72 100644 --- a/.github/workflows/downstream.yml +++ b/.github/workflows/downstream.yml @@ -2,9 +2,6 @@ name: Downstream on: workflow_dispatch: - schedule: - # Run every Monday at 6am UTC - - cron: '0 6 * * 1' pull_request: # We also want this workflow triggered if the `Downstream CI` label is # added or present when PR is updated @@ -12,8 +9,6 @@ on: - synchronize - labeled push: - branches: - - '*.*.x' tags: - '*' diff --git a/.github/workflows/s390x.yml b/.github/workflows/s390x.yml index 2ea439c90..d5a00fb1f 100644 --- a/.github/workflows/s390x.yml +++ b/.github/workflows/s390x.yml @@ -2,9 +2,6 @@ name: s390x on: workflow_dispatch: - schedule: - # Run every Monday at 6am UTC - - cron: '0 6 * * 1' pull_request: # We also want this workflow triggered if the `s390x` label is # added or present when PR is updated @@ -12,8 +9,6 @@ on: - synchronize - labeled push: - branches: - - '*.*.x' tags: - '*' diff --git a/.github/workflows/scheduled.yml b/.github/workflows/scheduled.yml new file mode 100644 index 000000000..0fc0f1ec3 --- /dev/null +++ b/.github/workflows/scheduled.yml @@ -0,0 +1,30 @@ +name: Scheduled Workflows + +on: + # Allow manual runs through the web UI + workflow_dispatch: + schedule: + # ┌───────── minute (0 - 59) + # │ ┌───────── hour (0 - 23) + # │ │ ┌───────── day of the month (1 - 31) + # │ │ │ ┌───────── month (1 - 12 or JAN-DEC) + # │ │ │ │ ┌───────── day of the week (0 - 6 or SUN-SAT) + - cron: '0 6 * * 1' # Every Monday at 6am UTC + +jobs: + dispatch_workflows: + runs-on: ubuntu-latest + strategy: + fail-fast: true + matrix: + branch: + - master + - 2.15.x + workflow: + - ci.yml + - downstream.yml + - s390x.yml + steps: + - run: gh workflow run ${{ matrix.workflow }} --repo asdf-format/asdf --ref ${{ matrix.branch }} + env: + GITHUB_TOKEN: ${{ secrets.WORKFLOW_TOKEN }}