mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-07 20:08:53 +00:00
[ticket/17394] Try using pull_request_target event
PHPBB-17394
This commit is contained in:
parent
7a21119d17
commit
15556319d9
1 changed files with 12 additions and 3 deletions
15
.github/workflows/tests.yml
vendored
15
.github/workflows/tests.yml
vendored
|
@ -13,10 +13,15 @@ on:
|
||||||
- 3.3.x
|
- 3.3.x
|
||||||
- master
|
- master
|
||||||
- 'prep-release-*'
|
- 'prep-release-*'
|
||||||
|
pull_request_target:
|
||||||
|
branches:
|
||||||
|
- 3.3.x
|
||||||
|
- master
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
# Basic checks, e.g. parse errors, commit messages, etc.
|
# Basic checks, e.g. parse errors, commit messages, etc.
|
||||||
basic-checks:
|
basic-checks:
|
||||||
|
if: github.event_name != 'pull_request_target'
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
|
@ -88,6 +93,7 @@ jobs:
|
||||||
|
|
||||||
# Tests for MySQL and MariaDB
|
# Tests for MySQL and MariaDB
|
||||||
mysql-tests:
|
mysql-tests:
|
||||||
|
if: github.event_name != 'pull_request_target'
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
|
@ -231,6 +237,7 @@ jobs:
|
||||||
|
|
||||||
# Tests for PostgreSQL
|
# Tests for PostgreSQL
|
||||||
postgres-tests:
|
postgres-tests:
|
||||||
|
if: github.event_name != 'pull_request_target'
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
|
@ -351,6 +358,7 @@ jobs:
|
||||||
|
|
||||||
# Other database types, namely sqlite3 and mssql
|
# Other database types, namely sqlite3 and mssql
|
||||||
other-tests:
|
other-tests:
|
||||||
|
if: github.event_name != 'pull_request_target'
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
|
@ -454,6 +462,7 @@ jobs:
|
||||||
|
|
||||||
# Test with IIS & PostgreSQL on Windows
|
# Test with IIS & PostgreSQL on Windows
|
||||||
windows-tests:
|
windows-tests:
|
||||||
|
if: github.event_name != 'pull_request_target'
|
||||||
runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
|
@ -598,7 +607,7 @@ jobs:
|
||||||
phpBB/vendor/bin/phpunit --configuration .github/phpunit-psql-windows-github.xml --verbose --stop-on-error --group functional
|
phpBB/vendor/bin/phpunit --configuration .github/phpunit-psql-windows-github.xml --verbose --stop-on-error --group functional
|
||||||
|
|
||||||
merge-check:
|
merge-check:
|
||||||
if: github.event.pull_request.base.ref == '3.3.x'
|
if: github.event_name == 'pull_request_target' && github.event.pull_request.base.ref == '3.3.x'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout the repository
|
- name: Checkout the repository
|
||||||
|
@ -618,13 +627,13 @@ jobs:
|
||||||
id: simulate_merge
|
id: simulate_merge
|
||||||
run: |
|
run: |
|
||||||
git checkout 3.3.x
|
git checkout 3.3.x
|
||||||
git merge --no-ff ${{ github.event.pull_request.head.sha }} --no-commit --no-ff || exit 1
|
git merge --no-ff ${{ github.event.pull_request.head.sha }} || exit 1
|
||||||
|
|
||||||
- name: Attempt to merge updated 3.3.x into master
|
- name: Attempt to merge updated 3.3.x into master
|
||||||
id: merge_master
|
id: merge_master
|
||||||
run: |
|
run: |
|
||||||
git checkout master
|
git checkout master
|
||||||
if git merge --no-ff origin/3.3.x --no-commit --no-ff; then
|
if git merge --no-ff origin/3.3.x --no-commit; then
|
||||||
echo "::set-output name=mergeable::true"
|
echo "::set-output name=mergeable::true"
|
||||||
else
|
else
|
||||||
echo "::set-output name=mergeable::false"
|
echo "::set-output name=mergeable::false"
|
||||||
|
|
Loading…
Add table
Reference in a new issue