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"