Skip to content

Commit

Permalink
GitHub workflows: Disable cron schedule for forks (solana-labs#34703)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
ilya-bobyr authored Jan 10, 2024
1 parent 5f74fc4 commit c5d51ac
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/autolock_bot_PR.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/autolock_bot_closed_issue.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/downstream-project-spl-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/manage-stale-issues-and-prs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c5d51ac

Please sign in to comment.