Skip to content

Commit

Permalink
Don't run scheduled workflows in forks (#13981)
Browse files Browse the repository at this point in the history
  • Loading branch information
fisker committed Dec 12, 2022
1 parent 28d097b commit 521de3b
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/bundler-friendly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ on:

jobs:
build:
if: github.event_name != 'schedule' || github.repository == 'prettier/prettier'
name: Build
runs-on: ubuntu-latest
steps:
Expand All @@ -36,6 +37,7 @@ jobs:
path: dist

webpack:
if: github.event_name != 'schedule' || github.repository == 'prettier/prettier'
name: Bundle Prettier with webpack
runs-on: ubuntu-latest
needs: [build]
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/dev-package-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ on:

jobs:
test:
if: github.event_name != 'schedule' || github.repository == 'prettier/prettier'
timeout-minutes: 60
strategy:
fail-fast: false
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/lock.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:

jobs:
lock:
if: github.event_name != 'schedule' || github.repository == 'prettier/prettier'
runs-on: ubuntu-latest
steps:
- uses: dessant/lock-threads@v3
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/no-response.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,15 @@ on:
types:
- created
schedule:
# “At minute 0.” https://crontab.guru/#0_*_*_*_*
- cron: "0 * * * *"
# “At 00:00.” https://crontab.guru/#0_0_*_*_*
- cron: "0 0 * * *"

permissions:
issues: write

jobs:
no-response:
if: github.event_name != 'schedule' || github.repository == 'prettier/prettier'
runs-on: ubuntu-latest
steps:
- uses: lee-dohm/no-response@v0.5.0
Expand Down

0 comments on commit 521de3b

Please sign in to comment.