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:
Illia Bobyr 2024-01-09 16:54:31 -08:00 committed by GitHub
parent 5f74fc4f16
commit c5d51acda8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 22 additions and 0 deletions

View File

@ -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

View File

@ -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

View File

@ -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:

View File

@ -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