Skip to content

Commit ee8539f

Browse files
authored
Enable test job to run when receiving PRs created by a Github Actions job (#267)
1 parent 63e534b commit ee8539f

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

.github/workflows/test.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,18 @@ on:
44
push:
55
branches: [main]
66
pull_request:
7+
types: [opened, reopened, synchronize]
8+
# Adding this to trigger the required CI jobs for PRs created by GitHub Actions jobs
9+
workflow_run:
10+
workflows: ['Update Translated Docs', 'Changesets Release'] # these must be the exact names of workflows
11+
types: [completed]
712

813
jobs:
914
test:
1015
runs-on: ubuntu-latest
16+
if: >
17+
github.event_name == 'pull_request' ||
18+
(github.event_name == 'workflow_run' && github.event.workflow_run.conclusion == 'success')
1119
env:
1220
NODE_OPTIONS: "--max_old_space_size=4096"
1321
strategy:

0 commit comments

Comments
 (0)