mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-03-24 19:21:54 +00: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
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches: [ main ]
|
||||
types:
|
||||
- labeled
|
||||
- opened
|
||||
- synchronize
|
||||
- reopened
|
||||
- ready_for_review
|
||||
pull_request_target:
|
||||
branches: [ main ]
|
||||
types:
|
||||
|
@ -24,7 +32,7 @@ env:
|
|||
|
||||
jobs:
|
||||
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
|
||||
name: Deploys to netlify
|
||||
env:
|
||||
|
|
3
.github/workflows/e2e.yml
vendored
3
.github/workflows/e2e.yml
vendored
|
@ -9,6 +9,8 @@ on:
|
|||
branches: [ main ]
|
||||
pull_request_target:
|
||||
branches: [ main ]
|
||||
pull_request:
|
||||
branches: [ main ]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
@ -19,6 +21,7 @@ env:
|
|||
|
||||
jobs:
|
||||
build-frontend:
|
||||
if: "${{ (github.event_name == 'pull_request_target') == github.event.pull_request.head.repo.fork }}"
|
||||
runs-on: ubuntu-latest
|
||||
name: Build test build of frontend
|
||||
steps:
|
||||
|
|
Loading…
Reference in a new issue