Skip to content

Commit

Permalink
Refactor sync-and-deploy.yaml to update Slack notification color base…
Browse files Browse the repository at this point in the history
…d on deployment success
  • Loading branch information
adamlahbib committed Nov 16, 2024
1 parent caef602 commit 3a658b3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/sync-and-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -153,5 +153,5 @@ jobs:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
SLACK_USERNAME: "Deployer on Cloudflare"
SLACK_MESSAGE: ${{ needs.deploy.outputs.message && needs.deploy.outputs.message || needs.terraform-apply.outputs.message }}
SLACK_COLOR: ${{ needs.deploy.outputs.message == *"successful"* && "good" || "danger" }}
SLACK_COLOR: ${{ contains(needs.deploy.outputs.message, "successful") && 'good' || 'danger' }}
SLACK_ICON: "https://avatars.githubusercontent.com/u/44036562?s=200&v=4"
2 changes: 1 addition & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -82,5 +82,5 @@ jobs:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
SLACK_USERNAME: "Test Pipeline Results"
SLACK_MESSAGE: ${{ needs.test-app.outputs.message }}
SLACK_COLOR: ${{ needs.test-app.outputs.message == *"failed"* && "danger" || "good" }}
SLACK_COLOR: ${{ contains(needs.test-app.outputs.message, 'failed') && 'danger' || 'good' }}
SLACK_ICON: "https://avatars.githubusercontent.com/u/44036562?s=200&v=4"

0 comments on commit 3a658b3

Please sign in to comment.