Skip to content

Commit

Permalink
๐Ÿ‘ท CI ๋นŒ๋“œ ์ˆ˜์ • : GitHub Action CICD Discord ์‹คํŒจ ์•Œ๋ฆผ ๊ธฐ๋Šฅ ์ˆ˜์ •
Browse files Browse the repository at this point in the history
- ์‹คํŒจ ์•Œ๋ฆผ if๋ฌธ ๋กœ์ง ์ˆ˜์ •

Ref : #35, #170
  • Loading branch information
rowing0328 authored Oct 22, 2024
1 parent 6a875db commit a326396
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions .github/workflows/gradle-build-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,16 +76,19 @@ jobs:
if: failure()
run: |
outcome_message=""
if: steps.build.outcome == 'failure'
outcome_message="${{ steps.build.outcome }}: ๋นŒ๋“œ ๋‹จ๊ณ„์—์„œ ์˜ค๋ฅ˜ ๋ฐœ์ƒ"
if [ "${{ steps.build.outcome }}" == "failure" ]; then
outcome_message+="๋นŒ๋“œ ๋‹จ๊ณ„์—์„œ ์˜ค๋ฅ˜ ๋ฐœ์ƒ. "
fi
if: steps.docker_build.outcome == 'failure'
outcome_message="${{ steps.docker_build.outcome }}: Docker ๋นŒ๋“œ ๋‹จ๊ณ„์—์„œ ์˜ค๋ฅ˜ ๋ฐœ์ƒ"
if [ "${{ steps.docker_build.outcome }}" == "failure" ]; then
outcome_message+="Docker ๋นŒ๋“œ ๋‹จ๊ณ„์—์„œ ์˜ค๋ฅ˜ ๋ฐœ์ƒ. "
fi
if: steps.deploy.outcome == 'failure'
outcome_message="${{ steps.deploy.outcome }}: ๋ฐฐํฌ ๋‹จ๊ณ„์—์„œ ์˜ค๋ฅ˜ ๋ฐœ์ƒ"
if [ "${{ steps.deploy.outcome }}" == "failure" ]; then
outcome_message+="๋ฐฐํฌ ๋‹จ๊ณ„์—์„œ ์˜ค๋ฅ˜ ๋ฐœ์ƒ. "
fi
curl -H "Content-Type: application/json" \
-d '{"content": "**๋ฐฐํฌ ์‹คํŒจ!** :x: \n๋นŒ๋“œ ๋ฐ ๋ฐฐํฌ ๊ณผ์ •์—์„œ ์˜ค๋ฅ˜๊ฐ€ ๋ฐœ์ƒํ–ˆ์Šต๋‹ˆ๋‹ค. ์˜ค๋ฅ˜ ๋‚ด์šฉ: '"${outcome_message}"'"}' \
${{ secrets.DISCORD_WEBHOOK_URL }}
${{ secrets.DISCORD_WEBHOOK_URL }}

0 comments on commit a326396

Please sign in to comment.