Skip to content

Commit

Permalink
Merge pull request #1475 from webknjaz/maintenance/gha-reusable-cron
Browse files Browse the repository at this point in the history
🧪🔧 Move cron trigger to separate GHA workflow
  • Loading branch information
webknjaz authored Dec 31, 2023
2 parents a1bd4fa + 617f04b commit 72c73ee
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 5 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/cron.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---

name: Cron

on:
schedule:
- cron: "0 6 * * *" # daily at 6am

jobs:
test:
if: github.repository_owner == 'pypa' # suppress noise in forks
uses: ./.github/workflows/test.yml

...
7 changes: 2 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ on:
branches-ignore:
- gh-readonly-queue/** # Temporary merge queue-related GH-made branches
pull_request:
schedule:
- cron: "0 6 * * *" # daily at 6am
workflow_call:

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
Expand Down Expand Up @@ -47,9 +46,7 @@ jobs:
# This job does nothing and is only used for the branch protection
# or multi-stage CI jobs, like making sure that all tests pass before
# a publishing job is started.
if: >-
github.repository_owner == 'pypa'
|| github.event_name != 'schedule'
if: always()

needs:
- build
Expand Down

0 comments on commit 72c73ee

Please sign in to comment.