Skip to content

Commit

Permalink
GHA: Slack us if Docker build or rendering fails (#438)
Browse files Browse the repository at this point in the history
* Add Slack notification to docker-build-push.yml

* Add Slack notification to docker-build.yml

* Add branch for testing

* Add library load of package not installed

* Revert "Add library load of package not installed"

This reverts commit 4e83ed1.

* Revert "Add branch for testing"

This reverts commit 0607350.
  • Loading branch information
jaclyn-taroni authored Dec 20, 2020
1 parent 6f6f02b commit 11f0877
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/docker-build-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,3 +91,14 @@ jobs:
git add -A
git commit -m 'Render html and publish' || echo "No changes to commit"
git push origin gh-pages || echo "No changes to push"
# If we have a failure, Slack us
- name: Report failure to Slack
if: always()
uses: ravsamhq/notify-slack-action@v1.1
with:
status: ${{ job.status }}
notify_when: 'failure'
env:
SLACK_WEBHOOK_URL: ${{ secrets.ACTION_MONITORING_SLACK }}
SLACK_MESSAGE: 'Build, Render, and Push failed'
11 changes: 11 additions & 0 deletions .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,14 @@ jobs:
tags: ccdl/refinebio-examples:latest
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache

# If we have a failure, Slack us
- name: Report failure to Slack
if: always()
uses: ravsamhq/notify-slack-action@v1.1
with:
status: ${{ job.status }}
notify_when: 'failure'
env:
SLACK_WEBHOOK_URL: ${{ secrets.ACTION_MONITORING_SLACK }}
SLACK_MESSAGE: 'Build Docker failed'

0 comments on commit 11f0877

Please sign in to comment.