forked from expressjs/express
-
Notifications
You must be signed in to change notification settings - Fork 0
30 lines (26 loc) · 971 Bytes
/
integration-tests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
name: Integration Tests
on:
- pull_request
- push
jobs:
dispatch:
runs-on: ubuntu-latest
steps:
- name: Get the branch name
id: get_branch
run: echo ::set-output name=branch::$(echo ${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}})
- name: Get the originating repository
id: get_repo
run: |
if [[ "${{ github.event_name }}" == "pull_request" ]]; then
echo ::set-output name=repo::${{ github.event.pull_request.head.repo.full_name }}
else
echo ::set-output name=repo::${{ github.repository }}
fi
- name: Repository Dispatch
uses: peter-evans/repository-dispatch@v1
with:
token: "${{ secrets.PAT_INTEGRATION_TESTS}}"
repository: expressjs/examples
event-type: integration-tests
client-payload: '{"branch": "${{ steps.get_branch.outputs.branch }}", "repo": "${{ steps.get_repo.outputs.repo }}"}'