1
0
mirror of https://github.com/flarum/core.git synced 2025-08-05 16:07:34 +02:00

test: prevent running both push and pull_request actions at the same time (#3597)

Not a 100% perfect solution, however as us maintainers always push branches directly to the original repository and make PRs from those, this is plenty enough. Instead of having 300+ actions in each PR which takes time, we'll just have the normal 171 `push` actions.

This makes sure to still run `pull_request` actions from contributors as they'd be forking the repo.

Signed-off-by: Sami Mazouz <ilyasmazouz@gmail.com>
This commit is contained in:
Sami Mazouz
2022-08-13 09:33:37 +01:00
committed by GitHub
parent f74f7f58cd
commit 6de8113720
2 changed files with 6 additions and 1 deletions

View File

@@ -88,7 +88,9 @@ jobs:
name: 'PHP ${{ matrix.php }} / ${{ matrix.db }} ${{ matrix.prefixStr }}'
if: inputs.enable_backend_testing
if: >-
inputs.enable_backend_testing &&
((github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository) || github.event_name != 'pull_request')
steps:
- uses: actions/checkout@master

View File

@@ -91,6 +91,9 @@ jobs:
name: Checks & Build
runs-on: ubuntu-latest
if: >-
((github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository) || github.event_name != 'pull_request')
steps:
- name: Check out code
uses: actions/checkout@v2