From ad4d1738bbcfb093d69ccd5da206bd83c737619a Mon Sep 17 00:00:00 2001 From: Adam Chalkley Date: Thu, 16 Feb 2023 07:00:47 -0600 Subject: [PATCH] Rework workflow scheduling - add scheduled-weekly.yml - add scheduled-monthly.yml - update project-analysis.yml - remove schedule - remove "on push" - apply jobs for PRs against ANY branch refs atc0005/shared-project-resources#68 --- .github/workflows/project-analysis.yml | 16 ---------------- .github/workflows/scheduled-monthly.yml | 21 +++++++++++++++++++++ .github/workflows/scheduled-weekly.yml | 21 +++++++++++++++++++++ 3 files changed, 42 insertions(+), 16 deletions(-) create mode 100644 .github/workflows/scheduled-monthly.yml create mode 100644 .github/workflows/scheduled-weekly.yml diff --git a/.github/workflows/project-analysis.yml b/.github/workflows/project-analysis.yml index e0df6815..74c25395 100644 --- a/.github/workflows/project-analysis.yml +++ b/.github/workflows/project-analysis.yml @@ -8,26 +8,10 @@ name: Project Analysis on: - push: - branches: [master] pull_request: - # The branches below must be a subset of the branches above - branches: [master] - # `synchronized` seems to equate to pushing new commits to a linked branch # (whether force-pushed or not) types: [opened, synchronize] - 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: "19 2 * * 0" jobs: lint: diff --git a/.github/workflows/scheduled-monthly.yml b/.github/workflows/scheduled-monthly.yml new file mode 100644 index 00000000..82695370 --- /dev/null +++ b/.github/workflows/scheduled-monthly.yml @@ -0,0 +1,21 @@ +# See LICENSE file in this repo for license details. + +name: Scheduled Monthly + +on: + 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: "30 4 1 * *" + +jobs: + lint: + name: Monthly Tasks + uses: atc0005/shared-project-resources/.github/workflows/scheduled-monthly.yml@master diff --git a/.github/workflows/scheduled-weekly.yml b/.github/workflows/scheduled-weekly.yml new file mode 100644 index 00000000..a8f00ba4 --- /dev/null +++ b/.github/workflows/scheduled-weekly.yml @@ -0,0 +1,21 @@ +# See LICENSE file in this repo for license details. + +name: Scheduled Weekly + +on: + 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: "30 4 * * 0" + +jobs: + lint: + name: Weekly Tasks + uses: atc0005/shared-project-resources/.github/workflows/scheduled-weekly.yml@master