mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-13 06:34:39 -04:00
feat: run e2e and deploy workflows from branch if non-fork
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
This commit is contained in:
parent
d44c0c6a7e
commit
d0e24175d7
2 changed files with 12 additions and 1 deletions
10
.github/workflows/deploy-pr.yml
vendored
10
.github/workflows/deploy-pr.yml
vendored
|
@ -5,6 +5,14 @@
|
||||||
name: deploy
|
name: deploy
|
||||||
|
|
||||||
on:
|
on:
|
||||||
|
pull_request:
|
||||||
|
branches: [ main ]
|
||||||
|
types:
|
||||||
|
- labeled
|
||||||
|
- opened
|
||||||
|
- synchronize
|
||||||
|
- reopened
|
||||||
|
- ready_for_review
|
||||||
pull_request_target:
|
pull_request_target:
|
||||||
branches: [ main ]
|
branches: [ main ]
|
||||||
types:
|
types:
|
||||||
|
@ -24,7 +32,7 @@ env:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
deploy:
|
deploy:
|
||||||
if: github.event.pull_request.draft == false || contains( github.event.pull_request.labels.*.name, 'FORCE DEPLOY')
|
if: (github.event.pull_request.draft == false || contains( github.event.pull_request.labels.*.name, 'FORCE DEPLOY')) && (github.event_name == 'pull_request_target') == github.event.pull_request.head.repo.fork
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
name: Deploys to netlify
|
name: Deploys to netlify
|
||||||
env:
|
env:
|
||||||
|
|
3
.github/workflows/e2e.yml
vendored
3
.github/workflows/e2e.yml
vendored
|
@ -9,6 +9,8 @@ on:
|
||||||
branches: [ main ]
|
branches: [ main ]
|
||||||
pull_request_target:
|
pull_request_target:
|
||||||
branches: [ main ]
|
branches: [ main ]
|
||||||
|
pull_request:
|
||||||
|
branches: [ main ]
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
|
@ -19,6 +21,7 @@ env:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-frontend:
|
build-frontend:
|
||||||
|
if: "${{ (github.event_name == 'pull_request_target') == github.event.pull_request.head.repo.fork }}"
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
name: Build test build of frontend
|
name: Build test build of frontend
|
||||||
steps:
|
steps:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue