From 38516e43dac78c520b84f92012241c8fdab14917 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bal=C3=A1zs=20Orb=C3=A1n?= Date: Mon, 7 Feb 2022 14:22:59 +0100 Subject: [PATCH] chore: do not run lock/stale actions on forks (#34053) The lock and stale actions will always fail on fork repos since they are using secrets that are not shared with the fork workflow runs. This PR addresses that by limiting the lock and stale actions to bail out on fork repo workflow runs. ## Bug - [ ] Related issues linked using `fixes #number` - [ ] Integration tests added - [ ] Errors have helpful link attached, see `contributing.md` ## Feature - [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR. - [ ] Related issues linked using `fixes #number` - [ ] Integration tests added - [ ] Documentation added - [ ] Telemetry added. In case of a feature if it's used or not. - [ ] Errors have helpful link attached, see `contributing.md` ## Documentation / Examples - [ ] Make sure the linting passes by running `yarn lint` --- .github/workflows/lock.yml | 1 + .github/workflows/stale.yml | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/lock.yml b/.github/workflows/lock.yml index c8df2516aa2c9..71a116d17bb6b 100644 --- a/.github/workflows/lock.yml +++ b/.github/workflows/lock.yml @@ -16,6 +16,7 @@ concurrency: jobs: action: runs-on: ubuntu-latest + if: github.repository_owner == 'vercel' steps: - uses: dessant/lock-threads@v3 with: diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index 1cbbfceb7cc5c..9c858d67608bb 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -8,6 +8,7 @@ on: jobs: stale: runs-on: ubuntu-latest + if: github.repository_owner == 'vercel' steps: - uses: actions/stale@v4 id: stale @@ -21,4 +22,4 @@ jobs: days-before-pr-close: -1 days-before-pr-stale: -1 exempt-issue-labels: 'blocked,must,should,keep' - operation-per-run: 300 # 1 operation per 100 issues, the rest is to label/comment/close + operations-per-run: 300 # 1 operation per 100 issues, the rest is to label/comment/close