fix(ci): use env var for Discord webhook secret in if-condition
GitHub Actions doesn't allow secrets context in if expressions. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
f824bd2007
commit
a0a341e3d3
1 changed files with 4 additions and 2 deletions
6
.github/workflows/pipeline.yml
vendored
6
.github/workflows/pipeline.yml
vendored
|
|
@ -178,11 +178,13 @@ jobs:
|
|||
--latest
|
||||
|
||||
- name: Post to Discord
|
||||
if: ${{ secrets.DISCORD_CHANGELOG_WEBHOOK != '' }}
|
||||
if: ${{ env.DISCORD_WEBHOOK != '' }}
|
||||
env:
|
||||
DISCORD_WEBHOOK: ${{ secrets.DISCORD_CHANGELOG_WEBHOOK }}
|
||||
run: |
|
||||
VERSION="${{ steps.release.outputs.version }}"
|
||||
NOTES=$(cat /tmp/release-notes.md)
|
||||
curl -s -X POST "${{ secrets.DISCORD_CHANGELOG_WEBHOOK }}" \
|
||||
curl -s -X POST "$DISCORD_WEBHOOK" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d "$(jq -n --arg c "**GSD v${VERSION} Released**\n\n${NOTES}\n\n\`npm i gsd-pi@${VERSION}\`" '{content:$c}')"
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue