Skip to content

Commit 7fb33ce

Browse files
committed
chore: update actions
1 parent 24f1575 commit 7fb33ce

4 files changed

Lines changed: 49 additions & 67 deletions

File tree

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: failureNotifications
2+
on:
3+
workflow_run:
4+
workflows:
5+
- publish
6+
- create-github-release
7+
types:
8+
- completed
9+
jobs:
10+
failure-notify:
11+
runs-on: ubuntu-latest
12+
if: ${{ github.event.workflow_run.conclusion == 'failure' }}
13+
steps:
14+
- name: Announce Failure
15+
id: slack
16+
uses: slackapi/slack-github-action@v1.26.0
17+
env:
18+
# for non-CLI-team-owned plugins, you can send this anywhere you like
19+
SLACK_WEBHOOK_URL: ${{ secrets.CLI_ALERTS_SLACK_WEBHOOK }}
20+
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK
21+
with:
22+
# Payload can be visually tested here: https://app.slack.com/block-kit-builder/T01GST6QY0G#%7B%22blocks%22:%5B%5D%7D
23+
# Only copy over the "blocks" array to the Block Kit Builder
24+
payload: |
25+
{
26+
"text": "Workflow \"${{ github.event.workflow_run.name }}\" failed in ${{ github.event.workflow_run.repository.name }}",
27+
"blocks": [
28+
{
29+
"type": "header",
30+
"text": {
31+
"type": "plain_text",
32+
"text": ":bh-alert: Workflow \"${{ github.event.workflow_run.name }}\" failed in ${{ github.event.workflow_run.repository.name }} :bh-alert:"
33+
}
34+
},
35+
{
36+
"type": "section",
37+
"text": {
38+
"type": "mrkdwn",
39+
"text": "*Repo:* ${{ github.event.workflow_run.repository.html_url }}\n*Workflow name:* `${{ github.event.workflow_run.name }}`\n*Job url:* ${{ github.event.workflow_run.html_url }}"
40+
}
41+
}
42+
]
43+
}

.github/workflows/test.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,14 @@ on:
66
workflow_dispatch:
77

88
jobs:
9+
yarn-lockfile-check:
10+
uses: salesforcecli/github-workflows/.github/workflows/lockFileCheck.yml@main
911
linux-unit-tests:
10-
uses: ./.github/workflows/unitTestsLinux.yml
12+
needs: yarn-lockfile-check
13+
uses: salesforcecli/github-workflows/.github/workflows/unitTestsLinux.yml@main
1114
windows-unit-tests:
12-
uses: ./.github/workflows/unitTestsWindows.yml
15+
needs: yarn-lockfile-check
16+
uses: salesforcecli/github-workflows/.github/workflows/unitTestsWindows.yml@main
1317
test-bundle:
1418
runs-on: ubuntu-latest
1519
steps:

.github/workflows/unitTestsLinux.yml

Lines changed: 0 additions & 31 deletions
This file was deleted.

.github/workflows/unitTestsWindows.yml

Lines changed: 0 additions & 34 deletions
This file was deleted.

0 commit comments

Comments
 (0)