Skip to content

Commit d2cbbca

Browse files
committed
review changes: naming conventions, message formatting, simplify yaml with env vars
1 parent b437f1e commit d2cbbca

File tree

2 files changed

+7
-13
lines changed

2 files changed

+7
-13
lines changed

.github/workflows/ci.yml

-5
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,3 @@ jobs:
4040
python-version: '3.12'
4141
- name: file_sync test
4242
run: python ./private/test/file_sync_test.py
43-
slack_test_fail:
44-
runs-on: ubuntu-latest
45-
steps:
46-
- name: fail step
47-
run: exit 1

.github/workflows/slack.yml

+7-8
Original file line numberDiff line numberDiff line change
@@ -8,21 +8,20 @@ on:
88
types: [completed]
99

1010
jobs:
11-
notify:
11+
notify_failure:
1212
runs-on: ubuntu-latest
1313
steps:
14-
- name: Notify Build Cop Slack
15-
if: github.event.workflow_run.conclusion == 'failure' || github.event.workflow_run.conclusion == 'timed_out'
14+
- name: \#buildcop Notify Build Failure
15+
if: ${{ github.event.workflow_run.conclusion }} == 'failure' || ${{ github.event.workflow_run.conclusion }} == 'timed_out'
1616
uses: ravsamhq/notify-slack-action@v2
1717
with:
1818
status: ${{ github.event.workflow_run.conclusion }}
1919
notification_title: >
20-
${{github.event.workflow_run.name}} failed on ${{github.event.workflow_run.head_branch}} -
21-
<${{github.server_url}}/${{github.repository}}/actions/runs/${{github.event.workflow_run.id}}|View Failure>
20+
${{github.event.workflow_run.name}} ${{ github.event.workflow_run.conclusion }} on {branch} -
21+
<{workflow_url}|View Failure>
2222
message_format: |
23-
Result: ${{github.event.workflow_run.conclusion}}
2423
Run: ${{github.event.workflow_run.run_number}}
25-
Branch: <${{github.server_url}}/${{github.repository}}/tree/${{github.event.workflow_run.head_branch}}|${{github.repository}}/${{github.event.workflow_run.head_branch}}>
26-
footer: "Repository: <${{github.server_url}}/${{github.repository}}|${{github.repository}}>"
24+
Branch: <{branch_url}|{branch}>
25+
footer: "Repository: <{repo_url}|{repo}>"
2726
env:
2827
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_BUILDCOP_URL }}

0 commit comments

Comments
 (0)