Skip to content

Commit

Permalink
Move inline values to environment variables in workflows (#3368)
Browse files Browse the repository at this point in the history
  • Loading branch information
mattcreaser authored Jul 28, 2023
1 parent 04bd7b9 commit 93f3d3d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/notify_comments.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,6 @@ jobs:
env:
WEBHOOK_URL: ${{ secrets.SLACK_COMMENT_WEBHOOK_URL }}
BODY: ${{ toJson(github.event.comment.body) }}
COMMENT_URL: ${{ github.event.comment.html_url }}
shell: bash
run: echo $BODY | xargs -I {} curl -s POST "$WEBHOOK_URL" -H "Content-Type:application/json" --data '{"issue":"${{github.event.comment.html_url}}", "body":"{}"}'
run: echo $BODY | xargs -I {} curl -s POST "$WEBHOOK_URL" -H "Content-Type:application/json" --data '{"issue":"'$COMMENT_URL'", "body":"{}"}'
5 changes: 4 additions & 1 deletion .github/workflows/notify_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,8 @@ jobs:
- name: Run webhook curl command
env:
WEBHOOK_URL: ${{ secrets.SLACK_RELEASE_WEBHOOK_URL }}
ACTION_NAME: ${{ github.event.action }}
REPO_URL: ${{ github.event.repository.html_url }}
VERSION: ${{ github.event.release.html_url }}
shell: bash
run: curl -s POST "$WEBHOOK_URL" -H "Content-Type:application/json" --data '{"action":"${{github.event.action}}", "repo":"${{github.event.repository.html_url}}", "version":"${{github.event.release.html_url}}"}'
run: curl -s POST "$WEBHOOK_URL" -H "Content-Type:application/json" --data '{"action":"'$ACTION_NAME'", "repo":"'$REPO_URL'", "version":"'$VERSION'"}'

0 comments on commit 93f3d3d

Please sign in to comment.