generated from jmeridth/template-repo
-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (47 loc) · 1.39 KB
/
release-discussion.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
47
---
name: "Release Discussion"
on:
workflow_call:
inputs:
full-tag:
required: true
type: string
body:
required: true
type: string
secrets:
github-token:
required: true
discussion-repository-id:
required: true
discussion-category-id:
required: true
jobs:
create_discussion:
runs-on: ubuntu-latest
permissions:
contents: read
discussions: write
env:
DISCUSSION_REPOSITORY_ID: ${{ secrets.discussion-repository-id }}
DISCUSSION_CATEGORY_ID: ${{ secrets.discussion-category-id }}
steps:
- name: Check for Discussion Repository ID
if: ${{ env.DISCUSSION_REPOSITORY_ID == '' }}
run: |
echo "discussion-repository-id secret is not set"
exit 1
- name: Check for Discussion Category ID
if: ${{ env.DISCUSSION_CATEGORY_ID == '' }}
run: |
echo "discussion-category-id secret is not set"
exit 1
- name: Create an Announcement Discussion for Release
uses: abirismyname/create-discussion@6e6ef67e5eeb042343ef8b3d8d0f5d545cbdf024
env:
GH_TOKEN: ${{ secrets.github-token }}
with:
title: ${{ inputs.full-tag }}
body: ${{ inputs.body }}
repository-id: ${{ env.DISCUSSION_REPOSITORY_ID }}
category-id: ${{ env.DISCUSSION_CATEGORY_ID }}