Skip to content

Commit

Permalink
Backport PR asdf-format#1391: Add a scheduled workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
WilliamJamieson authored and meeseeksmachine committed Feb 20, 2023
1 parent 5b63e35 commit fcee3b4
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 13 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@ name: CI

on:
workflow_dispatch:
schedule:
# Run every Monday at 6am UTC
- cron: '0 6 * * 1'
push:
branches:
- master
Expand Down
5 changes: 0 additions & 5 deletions .github/workflows/downstream.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,13 @@ 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
types:
- synchronize
- labeled
push:
branches:
- '*.*.x'
tags:
- '*'

Expand Down
5 changes: 0 additions & 5 deletions .github/workflows/s390x.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,13 @@ 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
types:
- synchronize
- labeled
push:
branches:
- '*.*.x'
tags:
- '*'

Expand Down
30 changes: 30 additions & 0 deletions .github/workflows/scheduled.yml
Original file line number Diff line number Diff line change
@@ -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 }}

0 comments on commit fcee3b4

Please sign in to comment.