Skip to content

Commit 6e509cf

Browse files
committed
#260 - revises the GH workflow to fire on pull_request_target instead of pull_request so we can build from code submitted in external respositories
1 parent 1e17920 commit 6e509cf

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

.github/workflows/deploy.and.test.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,18 @@ name: Create a Scratch Org, Push Source and Run Apex Tests
22

33
on:
44
push:
5-
branches:
6-
- master
7-
pull_request:
5+
pull_request_target:
86

97
jobs:
108
build:
119

1210
runs-on: ubuntu-latest
1311

1412
steps:
15-
- uses: actions/checkout@v2 #Check out this repo
13+
- uses: actions/checkout@v2
14+
with:
15+
ref: ${{github.event.pull_request.head.ref}}
16+
repository: ${{github.event.pull_request.head.repo.full_name}}
1617
- name: Install SFDX CLI and authorize DevHub
1718
uses: apex-enterprise-patterns/setup-sfdx@v1 #We're using a fork of https://github.com/sfdx-actions/setup-sfdx for safety
1819
with:

0 commit comments

Comments
 (0)