From ba85a67f71139299ff6d3e5a4cfc9a019c360384 Mon Sep 17 00:00:00 2001 From: jaspercroome <128058464+jaspercroome@users.noreply.github.com> Date: Mon, 18 Mar 2024 06:23:41 -0700 Subject: [PATCH] Update discourse_update.yml (#105) * Update discourse_update.yml env file as opposed to set * Update discourse_update.yml add category --- .github/workflows/discourse_update.yml | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/discourse_update.yml b/.github/workflows/discourse_update.yml index d32fad6..bcda8fa 100644 --- a/.github/workflows/discourse_update.yml +++ b/.github/workflows/discourse_update.yml @@ -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"