From 2243a814457690f61b38cfbb63421f7812a3b43c Mon Sep 17 00:00:00 2001 From: Tomas Votruba Date: Wed, 28 Oct 2020 21:47:56 +0100 Subject: [PATCH] [ci] add fix for missing secrets in 3rd party forks --- .github/workflows/ci_review.yaml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci_review.yaml b/.github/workflows/ci_review.yaml index 1d7a7ff7181..8c128c6dc79 100644 --- a/.github/workflows/ci_review.yaml +++ b/.github/workflows/ci_review.yaml @@ -38,11 +38,20 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + # workaround for missing secret in fork PRs - see https://github.com/actions/checkout/issues/298 + # see https://github.com/rectorphp/rector/commit/d395e1c28b8e6a56711dcc2e10490a82965850e4 + - + if: github.event.pull_request.head.repo.full_name == github.repository + uses: actions/checkout@v2 with: # Must be used to trigger workflow after push token: ${{ secrets.ACCESS_TOKEN }} + # in forks, the token is not available - so we cannot us eit + - + if: github.event.pull_request.head.repo.full_name != github.repository + uses: actions/checkout@v2 + # see https://github.com/shivammathur/setup-php - uses: shivammathur/setup-php@v1 with: