Skip to content

Commit 72c73ee

Browse files
authored
Merge pull request #1475 from webknjaz/maintenance/gha-reusable-cron
🧪🔧 Move cron trigger to separate GHA workflow
2 parents a1bd4fa + 617f04b commit 72c73ee

File tree

2 files changed

+16
-5
lines changed

2 files changed

+16
-5
lines changed

.github/workflows/cron.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
3+
name: Cron
4+
5+
on:
6+
schedule:
7+
- cron: "0 6 * * *" # daily at 6am
8+
9+
jobs:
10+
test:
11+
if: github.repository_owner == 'pypa' # suppress noise in forks
12+
uses: ./.github/workflows/test.yml
13+
14+
...

.github/workflows/test.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@ on:
66
branches-ignore:
77
- gh-readonly-queue/** # Temporary merge queue-related GH-made branches
88
pull_request:
9-
schedule:
10-
- cron: "0 6 * * *" # daily at 6am
9+
workflow_call:
1110

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

5451
needs:
5552
- build

0 commit comments

Comments
 (0)