[Github Action] Move fork check in steps for daily and weekly pull request (#5036)

This commit is contained in:
Abdul Malik Ikhsan 2020-12-29 21:23:12 +07:00 committed by GitHub
parent 59b71e04a3
commit fba0bac3f8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 9 deletions

View File

@ -7,9 +7,6 @@ on:
jobs:
daily_pull_requests:
# dont run jobs on forks, because gh-tokens are not available
if: github.event.pull_request.head.repo.full_name == github.repository
strategy:
fail-fast: false
matrix:
@ -40,25 +37,31 @@ jobs:
steps:
-
if: github.event.pull_request.head.repo.full_name == github.repository
uses: actions/checkout@v2
with:
token: ${{ secrets.ACCESS_TOKEN }}
# see https://github.com/shivammathur/setup-php
-
if: github.event.pull_request.head.repo.full_name == github.repository
uses: shivammathur/setup-php@v2
with:
php-version: 7.4
coverage: none
tools: composer:v2
- run: composer install --no-progress --ansi
-
if: github.event.pull_request.head.repo.full_name == github.repository
run: composer install --no-progress --ansi
-
if: github.event.pull_request.head.repo.full_name == github.repository
run: ${{ matrix.actions.run }}
# see https://github.com/peter-evans/create-pull-request
-
if: github.event.pull_request.head.repo.full_name == github.repository
name: Create pull-request
uses: peter-evans/create-pull-request@v3
with:

View File

@ -7,10 +7,6 @@ on:
jobs:
weekly_pull_requests:
# dont run jobs on forks, because gh-tokens are not available
if: github.event.pull_request.head.repo.full_name == github.repository
strategy:
fail-fast: false
matrix:
@ -25,25 +21,31 @@ jobs:
steps:
-
if: github.event.pull_request.head.repo.full_name == github.repository
uses: actions/checkout@v2
with:
token: ${{ secrets.ACCESS_TOKEN }}
# see https://github.com/shivammathur/setup-php
-
if: github.event.pull_request.head.repo.full_name == github.repository
uses: shivammathur/setup-php@v2
with:
php-version: 7.4
coverage: none
tools: composer:v2
- run: composer install --no-progress --ansi
-
if: github.event.pull_request.head.repo.full_name == github.repository
run: composer install --no-progress --ansi
-
if: github.event.pull_request.head.repo.full_name == github.repository
run: ${{ matrix.actions.run }}
# see https://github.com/peter-evans/create-pull-request
-
if: github.event.pull_request.head.repo.full_name == github.repository
name: Create pull-request
uses: peter-evans/create-pull-request@v3
with: