-
Notifications
You must be signed in to change notification settings - Fork 0
32 lines (30 loc) · 1.25 KB
/
blank.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
name: GitHub Actions Demo test
on: [push,fork,pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
# - name: Step to imitate failure
# run: pwdd
- name: Slack notification for common builds
uses: ravsamhq/notify-slack-action@v2
if: ${{ github.ref == 'refs/heads/main' }}
with:
status: ${{ job.status }}
token: ${{ secrets.GITHUB_TOKEN }}
notification_title: "{workflow} has {status_message}"
message_format: "{emoji} *{workflow}* {status_message} in <{repo_url}|{repo}>"
footer: "Linked Repo <{repo_url}|{repo}> | <{workflow_url}|View Workflow>"
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
- name: Slack notification for releases
uses: ravsamhq/notify-slack-action@v2
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
with:
status: ${{ job.status }}
token: ${{ secrets.GITHUB_TOKEN }}
notification_title: "*{workflow}* {status_message} in <{repo_url}|{repo}>"
message_format: "{emoji} Build ${{ github.ref_name }} has {status_message}"
footer: "Linked Repo <{repo_url}|{repo}> | <{workflow_url}|View Workflow>"
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}