diff --git a/.github/workflows/discord.yml b/.github/workflows/discord.yml index a0d90e1..ce2a3bf 100644 --- a/.github/workflows/discord.yml +++ b/.github/workflows/discord.yml @@ -21,6 +21,9 @@ jobs: (github.event_name == 'pull_request' && github.event.action == 'opened') steps: - name: Send to Discord + env: + DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }} + DISCORD_ATOMIC_ROLE_ID: ${{ secrets.DISCORD_ATOMIC_ROLE_ID }} run: | if [ "${{ github.event_name }}" == "pull_request" ] && [ "${{ github.event.action }}" == "opened" ]; then MESSAGE="PR Opened\nPR: ${{ github.event.pull_request.html_url }}\nTitle: ${{ github.event.pull_request.title }}\nRaised by: ${{ github.event.pull_request.user.login }}" @@ -32,5 +35,5 @@ jobs: MESSAGE="Push to master\nPushed by: ${{ github.actor }}\nAuthor: ${{ github.event.head_commit.author.name }}\nCommit: ${{ github.event.head_commit.message }}" fi curl -H "Content-Type: application/json" \ - -d "{\"content\": \"<@&${{ secrets.DISCORD_ATOMIC_ROLE_ID }}> $MESSAGE\"}" \ - ${{ secrets.DISCORD_WEBHOOK }} + -d "{\"content\": \"<@&${DISCORD_ATOMIC_ROLE_ID}> $MESSAGE\"}" \ + "$DISCORD_WEBHOOK"