Skip to content

Commit c377c1c

Browse files
committed
feat: add support for forks in the integration pipeline
related UlisesGascon/express-examples#8
1 parent 6551198 commit c377c1c

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

.github/workflows/integration-tests.yml

+11-1
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,20 @@ jobs:
1111
- name: Get the branch name
1212
id: get_branch
1313
run: echo ::set-output name=branch::$(echo ${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}})
14+
15+
- name: Get the originating repository
16+
id: get_repo
17+
run: |
18+
if [[ "${{ github.event_name }}" == "pull_request" ]]; then
19+
echo ::set-output name=repo::${{ github.event.pull_request.head.repo.full_name }}
20+
else
21+
echo ::set-output name=repo::${{ github.repository }}
22+
fi
23+
1424
- name: Repository Dispatch
1525
uses: peter-evans/repository-dispatch@v1
1626
with:
1727
token: "${{ secrets.PAT_INTEGRATION_TESTS}}"
1828
repository: ulisesgascon/express-examples
1929
event-type: integration-tests
20-
client-payload: '{"branch": "${{ steps.get_branch.outputs.branch }}"}'
30+
client-payload: '{"branch": "${{ steps.get_branch.outputs.branch }}", "repo": "${{ steps.get_repo.outputs.repo }}"}'

0 commit comments

Comments
 (0)