Skip to content

Commit 54ccf5f

Browse files
committed
Try using GitHub environment
1 parent 1b4af15 commit 54ccf5f

2 files changed

Lines changed: 10 additions & 2 deletions

File tree

.github/workflows/run-express-tests.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: Run Express Tests
22

33
on:
4-
pull_request:
4+
pull_request_target:
55
branches:
66
- development
77
push:
@@ -12,6 +12,8 @@ jobs:
1212
test:
1313
name: Run Express Tests
1414
runs-on: ubuntu-latest
15+
# Require manual approval for fork PRs
16+
environment: testing
1517

1618
defaults:
1719
run:
@@ -20,6 +22,8 @@ jobs:
2022
steps:
2123
- name: Checkout code
2224
uses: actions/checkout@v5
25+
with:
26+
ref: ${{ github.event.pull_request.head.sha }}
2327

2428
- name: Set up Node.js
2529
uses: actions/setup-node@v4

.github/workflows/run-java-spring-boot-tests.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: Run Java Spring Boot Tests
22

33
on:
4-
pull_request:
4+
pull_request_target:
55
branches:
66
- development
77
push:
@@ -12,6 +12,8 @@ jobs:
1212
test:
1313
name: Run Java Spring Boot Tests
1414
runs-on: ubuntu-latest
15+
# Require manual approval for fork PRs
16+
environment: testing
1517

1618
defaults:
1719
run:
@@ -24,6 +26,8 @@ jobs:
2426
steps:
2527
- name: Checkout code
2628
uses: actions/checkout@v5
29+
with:
30+
ref: ${{ github.event.pull_request.head.sha }}
2731

2832
- name: Set up JDK 21
2933
uses: actions/setup-java@v5

0 commit comments

Comments
 (0)