Skip to content

Commit

Permalink
Update discourse_update.yml (#105)
Browse files Browse the repository at this point in the history
* Update discourse_update.yml

env file as opposed to set

* Update discourse_update.yml

add category
  • Loading branch information
jaspercroome authored Mar 18, 2024
1 parent d90fccc commit ba85a67
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions .github/workflows/discourse_update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,20 @@ jobs:
- name: Get Issue Details
id: issue_details
run: |
echo "::set-output name=title::${{ github.event.issue.title }}"
echo "::set-output name=body::${{ github.event.issue.body }}"
echo "::set-output name=author::${{ github.event.issue.user.login }}"
echo "::set-output name=status::${{ github.event.issue.state }}"
echo "title=${{ github.event.issue.title }}" >> $GITHUB_ENV
echo "body=${{ github.event.issue.body }}" >> $GITHUB_ENV
echo "author=${{ github.event.issue.user.login }}" >> $GITHUB_ENV
echo "status=${{ github.event.issue.state }}" >> $GITHUB_ENV
- name: Post Update to Discourse
run: |
DISCOURSE_API_TOKEN=$DISCOURSE_UPDATE_SECRET
DISCOURSE_URL=https://goodbids.discourse.group/c/tiny/the-backlog
ISSUE_TITLE="${{ steps.issue_details.outputs.title }}"
ISSUE_BODY="${{ steps.issue_details.outputs.body }}"
ISSUE_AUTHOR="${{ steps.issue_details.outputs.author }}"
ISSUE_STATUS="${{ steps.issue_details.outputs.status }}"
DISCOURSE_API_TOKEN=$DISCOURSE_API_TOKEN
DISCOURSE_URL=$DISCOURSE_URL
ISSUE_TITLE="${{ env.title }}"
ISSUE_BODY="${{ env.body }}"
ISSUE_AUTHOR="${{ env.author }}"
ISSUE_STATUS="${{ env.status }}"
JSON_DATA="{\"title\": \"$ISSUE_TITLE\", \"body\": \"$ISSUE_BODY\", \"author\": \"$ISSUE_AUTHOR\", \"status\": \"$ISSUE_STATUS\"}"
JSON_DATA="{\"title\": \"$ISSUE_TITLE\", \"body\": \"$ISSUE_BODY\", \"author\": \"$ISSUE_AUTHOR\", \"status\": \"$ISSUE_STATUS\", \"category\": 22}"
curl -X POST -H "Authorization: Bearer ${{ secrets.DISCOURSE_API_TOKEN }}" -H "Content-Type: application/json" -d "$JSON_DATA" "$DISCOURSE_URL/api/update_category"

1 comment on commit ba85a67

@vercel
Copy link

@vercel vercel bot commented on ba85a67 Mar 18, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.