Generate Discussion Thread for Hackdays #27
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Generate Discussion Thread for Hackdays | ||
on: | ||
workflow_dispatch: | ||
jobs: | ||
create-discussion-threads: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
discussions: write | ||
contents: read | ||
steps: | ||
- name: Create Discussions | ||
env: | ||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
DISCUSSIONS_BODY: "sample text" | ||
DISCUSSIONS_TITLE: "sample text" | ||
REPOSITORY_ID: "R_kgDOL9OsOA" | ||
CATEGORY_ID: "DIC_kwDOL9OsOM4ClttG" | ||
run: | | ||
Check failure on line 22 in .github/workflows/discussions.yml
|
||
gh api graphql -f query="mutation | ||
{ createDiscussion | ||
(input: | ||
{repositoryId: ${{env.REPOSITORY_ID}}, | ||
categoryId: ${{env.CATEGORY_ID}}, | ||
body: ${{DISCUSSIONS_BODY}}, | ||
title: ${{DISCUSSIONS_TITLE}} | ||
) | ||
{ | ||
discussion {id} | ||
} | ||
}" |