-
-
Notifications
You must be signed in to change notification settings - Fork 55
52 lines (46 loc) · 1.56 KB
/
create-discussions.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
51
52
name: Create GitHub Discussions
on:
pull_request:
types: [opened]
paths:
- 'src/content/apps/**'
workflow_dispatch:
inputs:
createForExisting:
description: 'Create discussions for existing apps'
required: true
default: 'true'
type: boolean
jobs:
create-discussion:
runs-on: ubuntu-latest
permissions:
discussions: write
pull-requests: read
contents: read
steps:
- uses: actions/checkout@v4
- name: Create Discussion for PR
if: github.event_name == 'pull_request'
uses: abirismyname/[email protected]
with:
title: Vote: ${{ appData.name }} by ${{ appData.author }}
body: |
🗳️ **Vote for this app by giving it a 👍 reaction!**
${{ appData.description }}
repository-id: ${{ secrets.REPO_ID }}
category-id: ${{ secrets.CAT_ID }}
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Create Discussions for Existing Apps
if: github.event_name == 'workflow_dispatch' && github.event.inputs.createForExisting == 'true'
uses: abirismyname/[email protected]
with:
title: Vote: ${{ appData.name }} by ${{ appData.author }}
body: |
🗳️ **Vote for this app by giving it a 👍 reaction!**
${{ appData.description }}
repository-id: ${{ secrets.REPO_ID }}
category-id: ${{ secrets.CAT_ID }}
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}