[ci] add fix for missing secrets in 3rd party forks

This commit is contained in:
Tomas Votruba 2020-10-28 21:47:23 +01:00
parent 7bd20258bc
commit 4d4def62d1

View File

@ -28,11 +28,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
-
uses: shivammathur/setup-php@v1
with: