-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add
keep-workflows-enabled
GH Action workflow
Uses the GH API to "enable" scheduled workflows on the first of every month as a work-around for scheduled workflows being automatically disabled when no repository activity has occurred in 60 days. Included all active Nextstrain org GH Action workflows that have the `schedule` trigger plus this new workflow so it keeps itself enabled. <https://github.com/search?q=org%3Anextstrain+path%3A.github%2Fworkflows%2F**+schedule&type=code>
- Loading branch information
1 parent
351da09
commit f9074c4
Showing
1 changed file
with
58 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
# This workflow is intended to keep scheduled GH Action workflows enabled | ||
# as a work-around for scheduled workflows being automatically disabled when | ||
# no repository activity has occurred in 60 days. | ||
name: Keep workflows enabled | ||
|
||
on: | ||
schedule: | ||
# Scheduled to run at 4pm UTC (8am PST) on the first day of the month | ||
- cron: '0 16 1 * *' | ||
|
||
workflow_dispatch: | ||
|
||
jobs: | ||
enable-workflow: | ||
permissions: | ||
actions: write | ||
env: | ||
GH_TOKEN: ${{ github.token }} | ||
name: enable-workflow (${{ matrix.repo }}/${{ matrix.workflow }}) | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
- { repo: .github, workflow: keep-workflows-enabled.yaml } | ||
- { repo: augur, workflow: ci.yaml } | ||
- { repo: avian-flu, workflow: ingest-to-phylogenetic-ncbi.yaml } | ||
- { repo: cli, workflow: ci.yaml } | ||
- { repo: cli, workflow: standalone-installers.yaml } | ||
- { repo: conda-base, workflow: installation.yaml } | ||
- { repo: dengue, workflow: ingest-to-phylogenetic.yaml } | ||
- { repo: forecasts-ncov, workflow: update-ncov-case-counts.yaml } | ||
- { repo: lassa, workflow: ci.yaml } | ||
- { repo: lassa, workflow: ingest-to-phylogenetic.yaml } | ||
- { repo: measles, workflow: ingest-to-phylogenetic.yaml } | ||
- { repo: mpox, workflow: fetch-and-ingest.yaml } | ||
- { repo: ncov, workflow: rebuild-100k.yml } | ||
- { repo: ncov-ingest, workflow: fetch-and-ingest-genbank-master.yml } | ||
- { repo: ncov-ingest, workflow: fetch-and-ingest-gisaid-master.yml } | ||
- { repo: nextstrain.org, workflow: index-resources.yml } | ||
- { repo: nextstrain.org, workflow: remind-to-promote.yml } | ||
- { repo: nipah, workflow: ingest-to-phylogenetic.yaml } | ||
- { repo: oropouche, workflow: ingest-to-phylogenetic.yaml } | ||
- { repo: rabies, workflow: ingest-to-phylogenetic.yaml } | ||
- { repo: rsv, workflow: fetch-and-ingest.yaml } | ||
- { repo: rsv, workflow: rebuild.yaml } | ||
- { repo: seasonal-cov, workflow: ingest-to-phylogenetic.yaml } | ||
- { repo: status, workflow: ci.yaml } | ||
- { repo: WNV, workflow: ingest-to-phylogenetic.yaml } | ||
- { repo: zika, workflow: ingest-to-phylogenetic.yaml } | ||
|
||
runs-on: ubuntu-latest | ||
steps: | ||
- run: | | ||
gh api \ | ||
--method PUT \ | ||
-H "Accept: application/vnd.github+json" \ | ||
-H "X-GitHub-Api-Version: 2022-11-28" \ | ||
/repos/nextstrain/${{matrix.repo}}/actions/workflows/${{matrix.workflow}}/enable |