forked from im-juma-training-sb/gh-abcs-actions
-
Notifications
You must be signed in to change notification settings - Fork 0
38 lines (35 loc) · 1.03 KB
/
github-script.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
name: 05-1. GitHub Script - Thank you
on:
issues:
types: [opened, edited, reopened, labeled]
# Limit the permissions of the GITHUB_TOKEN
permissions:
contents: read
issues: write
jobs:
comment:
runs-on: ubuntu-latest
steps:
- uses: actions/github-script@v7
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: '👋 Thank you! We appreciate your contribution to this project.'
})
apply-label:
runs-on: ubuntu-latest
steps:
- uses: actions/github-script@v7
with:
script: |
github.rest.issues.addLabels({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
labels: ['Training']
})
- uses: /actions/my-new-action@main