Skip to content

Commit

Permalink
Notify tooling channel when CI fails (#532)
Browse files Browse the repository at this point in the history
* Notify tooling channel when CI fails

* remove from ci.yml

* add back publish-check

* whitespace
  • Loading branch information
sdankel authored Dec 1, 2023
1 parent 714e196 commit eefaa58
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 16 deletions.
17 changes: 1 addition & 16 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,19 +108,6 @@ jobs:
- name: Run Cargo.toml linter
run: git ls-files | grep Cargo.toml$ | xargs --verbose -n 1 cargo-toml-lint

- name: Notify if Job Fails
uses: ravsamhq/notify-slack-action@v1
if: always() && github.ref == 'refs/heads/master'
with:
status: ${{ job.status }}
token: ${{ secrets.GITHUB_TOKEN }}
notification_title: "{workflow} has {status_message}"
message_format: "{emoji} *{workflow}* {status_message} in <{repo_url}|{repo}> : <{run_url}|View Run Results>"
footer: ""
notify_when: "failure"
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_NOTIFY_BUILD }}

publish-check:
# Only do this job if publishing a release
needs:
Expand All @@ -137,10 +124,8 @@ jobs:
curl -sSLf "https://github.com/TomWright/dasel/releases/download/v1.24.3/dasel_linux_amd64" -L -o dasel && chmod +x dasel
mv ./dasel /usr/local/bin/dasel
./.github/workflows/scripts/verify_tag.sh ${{ github.ref_name }} Cargo.toml
- name: Notify if Job Fails
uses: ravsamhq/notify-slack-action@v1
if: always()
with:
status: ${{ job.status }}
token: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -149,7 +134,7 @@ jobs:
footer: ""
notify_when: "failure"
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_NOTIFY_BUILD }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_TOOLING }}

build-release:
name: build fuelup release binaries
Expand Down
12 changes: 12 additions & 0 deletions .github/workflows/nightly-cargo-audit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,15 @@ jobs:
- uses: actions-rs/audit-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Notify if Job Fails
uses: ravsamhq/notify-slack-action@v1
with:
status: ${{ job.status }}
token: ${{ secrets.GITHUB_TOKEN }}
notification_title: "{workflow} has {status_message}"
message_format: "{emoji} *{workflow}* {status_message} in <{repo_url}|{repo}> : <{run_url}|View Run Results>"
footer: ""
notify_when: "failure"
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_TOOLING }}

12 changes: 12 additions & 0 deletions .github/workflows/publish-nightly-channel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,15 @@ jobs:
destination_dir: ${{ steps.setup.outputs.archive_dir }}
user_name: 'github-actions[bot]'
user_email: 'github-actions[bot]@users.noreply.github.com'

- name: Notify if Job Fails
uses: ravsamhq/notify-slack-action@v1
with:
status: ${{ job.status }}
token: ${{ secrets.GITHUB_TOKEN }}
notification_title: "{workflow} has {status_message}"
message_format: "{emoji} *{workflow}* {status_message} in <{repo_url}|{repo}> : <{run_url}|View Run Results>"
footer: ""
notify_when: "failure"
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_TOOLING }}

0 comments on commit eefaa58

Please sign in to comment.