Skip to content
This repository has been archived by the owner on Jan 26, 2024. It is now read-only.

Commit

Permalink
Post to slack on failures.
Browse files Browse the repository at this point in the history
This adds a slack action to post to our slack instance when releases fail, so we get visibility into them.

I also noticed we didn't set concurrency, so multiple releases could kick off concurrently, and this corrects that.

Signed-off-by: Matt Moore <[email protected]>
  • Loading branch information
mattmoor committed Apr 12, 2022
1 parent f5c4328 commit 4227c86
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ on:

name: Create Release

# Don't run multiple releases concurrently.
concurrency: release

jobs:
build:
name: Release OCI image
Expand All @@ -24,3 +27,17 @@ jobs:
with:
config: .apko.yaml
base-tag: ghcr.io/${{ github.repository }}

# Post to slack when things fail.
- if: ${{ failure() }}
uses: rtCamp/[email protected]
env:
SLACK_ICON: http://github.com/chainguardian.png?size=48
SLACK_USERNAME: chainguardian
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
SLACK_CHANNEL: distroless
SLACK_COLOR: '#8E1600'
MSG_MINIMAL: 'true'
SLACK_TITLE: Releasing ${{ github.repository }} failed.
SLACK_MESSAGE: |
For detailed logs: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}

0 comments on commit 4227c86

Please sign in to comment.