mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-16 19:57:52 +01:00
ci: use pull_request_target with authorization hook where required
This commit is contained in:
14
.github/workflows/core.tests.yml
vendored
14
.github/workflows/core.tests.yml
vendored
@@ -9,7 +9,7 @@ on:
|
|||||||
- "packages/core/**"
|
- "packages/core/**"
|
||||||
# re-run workflow if workflow file changes
|
# re-run workflow if workflow file changes
|
||||||
- ".github/workflows/core.tests.yml"
|
- ".github/workflows/core.tests.yml"
|
||||||
pull_request:
|
pull_request_target:
|
||||||
branches:
|
branches:
|
||||||
- "master"
|
- "master"
|
||||||
paths:
|
paths:
|
||||||
@@ -23,9 +23,17 @@ on:
|
|||||||
- "reopened"
|
- "reopened"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
authorize:
|
||||||
runs-on: ubuntu-22.04
|
environment: ${{ github.event_name == 'pull_request_target' &&
|
||||||
|
github.event.pull_request.head.repo.full_name != github.repository &&
|
||||||
|
'external' || 'internal' }}
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- run: echo true
|
||||||
|
|
||||||
|
test:
|
||||||
|
needs: authorize
|
||||||
|
runs-on: ubuntu-22.04
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
|||||||
11
.github/workflows/web.tests.yml
vendored
11
.github/workflows/web.tests.yml
vendored
@@ -9,7 +9,7 @@ on:
|
|||||||
- "apps/web/**"
|
- "apps/web/**"
|
||||||
# re-run workflow if workflow file changes
|
# re-run workflow if workflow file changes
|
||||||
- ".github/workflows/web.tests.yml"
|
- ".github/workflows/web.tests.yml"
|
||||||
pull_request:
|
pull_request_target:
|
||||||
branches:
|
branches:
|
||||||
- "master"
|
- "master"
|
||||||
paths:
|
paths:
|
||||||
@@ -23,7 +23,16 @@ on:
|
|||||||
- "reopened"
|
- "reopened"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
authorize:
|
||||||
|
environment: ${{ github.event_name == 'pull_request_target' &&
|
||||||
|
github.event.pull_request.head.repo.full_name != github.repository &&
|
||||||
|
'external' || 'internal' }}
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- run: echo true
|
||||||
|
|
||||||
build:
|
build:
|
||||||
|
needs: authorize
|
||||||
name: Build
|
name: Build
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
steps:
|
steps:
|
||||||
|
|||||||
Reference in New Issue
Block a user