-
Notifications
You must be signed in to change notification settings - Fork 24
50 lines (47 loc) · 1.58 KB
/
exercise.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
38
39
40
41
42
43
44
45
46
47
48
49
50
name: Exercise
# on issues created or updated
on:
issues:
types:
- opened
- edited
permissions:
issues: write
contents: read
jobs:
ex1:
runs-on: ubuntu-latest
# if issue title is ex1
if: ${{ github.event.issue.title == 'Ex1' || github.event.issue.title == 'ex1' || github.event.issue.title == '练习1' || github.event.issue.title == '练习一' }}
steps:
- uses: actions/checkout@v3
- name: Comment on issue
uses: peter-evans/create-or-update-comment@v2
with:
issue-number: ${{ github.event.issue.number }}
body-file: .github/ISSUE_TEMPLATE/exercise1.md
token: ${{ secrets.GITHUB_TOKEN }}
- name: Add label
uses: andymckay/labeler@master
with:
add-labels: "exercise1"
- name: Assign author to issue
uses: technote-space/assign-author@v1
ex2:
runs-on: ubuntu-latest
# if issue title is ex2
if: ${{ github.event.issue.title == 'Ex2' || github.event.issue.title == 'ex2' || github.event.issue.title == '练习2' || github.event.issue.title == '练习二' }}
steps:
- uses: actions/checkout@v3
- name: Comment on issue
uses: peter-evans/create-or-update-comment@v2
with:
issue-number: ${{ github.event.issue.number }}
body-file: .github/ISSUE_TEMPLATE/exercise2.md
token: ${{ secrets.GITHUB_TOKEN }}
- name: Add label
uses: andymckay/labeler@master
with:
add-labels: "exercise2"
- name: Assign author to issue
uses: technote-space/assign-author@v1