-
Notifications
You must be signed in to change notification settings - Fork 1
30 lines (27 loc) · 1.22 KB
/
test.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: CI
on: pull_request_target
jobs:
test:
name: Test
runs-on: ubuntu-latest
steps:
- name: view the github context
run: echo "$GITHUB_CONTEXT"
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
- name: view refs
run: |
echo "====================================== pr ref ======================================"
echo "github.ref = ${{ github.ref }}"
echo "github.sha = ${{ github.sha }}"
echo "GITHUB_SHA = $GITHUB_SHA"
echo "===================================== base ref ====================================="
echo "github.event.pull_request.base.ref = ${{ github.event.pull_request.base.ref }}"
echo "github.event.pull_request.base.sha = ${{ github.event.pull_request.base.sha }}"
echo "===================================== head ref ====================================="
echo "github.event.pull_request.head.ref = ${{ github.event.pull_request_target.head.ref }}"
echo "github.event.pull_request.head.sha = ${{ github.event.pull_request.head.sha }}"
- name: Checkout code
uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.head.sha }}