Skip to content

Generate Discussion Thread for Hackdays #37

Generate Discussion Thread for Hackdays

Generate Discussion Thread for Hackdays #37

Workflow file for this run

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 }}
DISCUSSION_BODY: |
Reporting out on earthaccess hack days.
Please create a new comment (at the very bottom, use the text box with a button that says "comment", not "reply") to write about what you did today!
Please include links to GitHub issues or pull requests relevant to your work, and use those issues or pull requests as the "source of truth" for documenting the work; this makes future readers jobs easier :) It's OK to duplicate some information while writing a summary here!
Use the "reply" feature to have a discussion under any given comment.
DISCUSSION_TITLE: "Hackathon:"
REPOSITORY_ID: \"R_kgDOL9OsOA\"
CATEGORY_ID: \"DIC_kwDOL9OsOM4ClttG\"
run: |

Check failure on line 26 in .github/workflows/discussions.yml

View workflow run for this annotation

GitHub Actions / Generate Discussion Thread for Hackdays

Invalid workflow file

The workflow is not valid. .github/workflows/discussions.yml (Line: 26, Col: 14): Unexpected symbol: '$'. Located at position 1 within expression: $(env.DISCUSSION_TITLE += DATE)
export DATE=$(date --iso-8601 | sed 's|-|/|g')
gh api graphql -f query="mutation
{ createDiscussion
(input:
{repositoryId: ${{ env.REPOSITORY_ID }},
categoryId: ${{ env.CATEGORY_ID }},
body: \"${{ env.DISCUSSION_BODY }}\",
title: \"${{ $(env.DISCUSSION_TITLE += DATE) }}\"}
)
{
discussion {id}
}
}"