/
action.yaml
46 lines (41 loc) 路 1.36 KB
/
action.yaml
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
# https://docs.github.com/en/actions/creating-actions/metadata-syntax-for-github-actions#runstepsif
name: "Gitcord"
description: "expand GitHub into Discord"
inputs:
github-event-name:
description: "GitHub event name used as $GITHUB_EVENT_NAME"
requried: true
github-event-payload:
description: "GitHub event payload JSON used as $GITHUB_EVENT_PAYLOAD"
required: true
github-token:
description: "GitHub token used as $GITHUB_TOKEN"
required: true
discord-token:
description: "Discord token used as $DISCORD_TOKEN"
required: true
discord-channel-id:
description: "Discord channel ID used as $DISCORD_CHANNEL_ID"
required: true
version:
description: "Version of Gitcord CLI"
default: "latest"
runs:
using: "composite"
steps:
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: "1.19"
- name: Install Gitcord
shell: bash
run: go install github.com/ethanthatonekid/gitcord@${{ inputs.version }}
- name: Run Gitcord for GitHub event
shell: bash
run: gitcord
env:
GITHUB_TOKEN: "${{ inputs.github-token }}"
GITHUB_EVENT_NAME: ${{ inputs.github-event-name }}
GITHUB_EVENT_PAYLOAD: ${{ inputs.github-event-payload }}
DISCORD_TOKEN: "${{ inputs.discord-token }}"
DISCORD_CHANNEL_ID: "${{ inputs.discord-channel-id }}"