GitHub workflows: Disable cron schedule for forks (#34703)
Forks will run all the cron schedules. And I do not think they benefit from those. For the downstream project checks, these runs are actually very expensive - about an hour of run time per execution. Easily draining free account limits.
This commit is contained in:
parent
5f74fc4f16
commit
c5d51acda8
|
@ -14,6 +14,11 @@ concurrency:
|
|||
|
||||
jobs:
|
||||
action:
|
||||
# Forks do not need to run this, especially on cron schedule.
|
||||
if: >
|
||||
github.event_name != 'schedule'
|
||||
|| github.repository == 'solana-labs/solana'
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: dessant/lock-threads@v3
|
||||
|
|
|
@ -14,6 +14,11 @@ concurrency:
|
|||
|
||||
jobs:
|
||||
action:
|
||||
# Forks do not need to run this, especially on cron schedule.
|
||||
if: >
|
||||
github.event_name != 'schedule'
|
||||
|| github.repository == 'solana-labs/solana'
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: dessant/lock-threads@v3
|
||||
|
|
|
@ -6,6 +6,13 @@ on:
|
|||
|
||||
jobs:
|
||||
main:
|
||||
# As this is a cron job, it is better to avoid running it for all the forks.
|
||||
# They are unlike to benefit from these executions, and they could easily
|
||||
# eat up all the minutes GitHub allocation to free accounts.
|
||||
if: >
|
||||
github.event_name != 'schedule'
|
||||
|| github.repository == 'solana-labs/solana'
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
|
|
|
@ -17,6 +17,11 @@ permissions:
|
|||
|
||||
jobs:
|
||||
stale:
|
||||
# Forks do not need to run this, especially on cron schedule.
|
||||
if: >
|
||||
github.event_name != 'schedule'
|
||||
|| github.repository == 'solana-labs/solana'
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/stale@v6
|
||||
|
|
Loading…
Reference in New Issue