-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (31 loc) · 889 Bytes
/
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
31
32
33
34
35
36
37
on:
workflow_dispatch:
inputs:
msg:
description: input a message
default: hello
sha:
description: Sha of pull request
default: 0
required: true
pull_request:
jobs:
my_test:
runs-on: ubuntu-20.04
steps:
- name: Checkout playground on pull request
if: github.event_name == 'pull_request'
uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Checkout playground on dispatch
if: github.event_name == 'workflow_dispatch'
uses: actions/checkout@v2
with:
ref: ${{ github.event.inputs.sha }}
- name: Run test on pull request
if: github.event_name == 'pull_request'
run: echo "pull request test"
- name: Run test on dispatch
if: github.event_name == 'workflow_dispatch'
run: echo "dispatch test"