-
Notifications
You must be signed in to change notification settings - Fork 39
42 lines (42 loc) · 1.48 KB
/
submit-verification-request.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
name: Submit Verification Request
on:
issue_comment:
types: [created, edited]
jobs:
submit:
if: ${{ github.event.issue.pull_request }}
runs-on: ubuntu-latest
steps:
- name: Install Node
uses: actions/setup-node@v3
if: contains(github.event.comment.body, '/verify')
with:
node-version: 16
- uses: actions/github-script@v6
id: process-comment
if: contains(github.event.comment.body, '/verify')
with:
script: |
const body = context.payload.comment.body
return body
- uses: actions/checkout@v3
if: contains(github.event.comment.body, '/verify')
- name: Install Packages
if: contains(github.event.comment.body, '/verify')
run: yarn --cwd ./scripts install --frozen-lockfile
- name: Submit Request to Discord
if: contains(github.event.comment.body, '/verify')
run: node --no-warnings ./scripts/verify/index.js
env:
DISCORD_VERIFY_WEBHOOK: ${{ secrets.DISCORD_VERIFY_WEBHOOK }}
EXTENSION_KEY: ${{ steps.process-comment.outputs.result }}
- uses: actions/github-script@v6
if: contains(github.event.comment.body, '/verify')
with:
script: |
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: 'Verification has been submitted'
})