-
Notifications
You must be signed in to change notification settings - Fork 10
51 lines (50 loc) · 1.41 KB
/
build-action.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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: build
# This workflow is triggered on pushes to the repository.
on: [push, pull_request]
jobs:
build:
name: build-job
runs-on: ubuntu-latest
steps:
- name: Slack Notify Build
continue-on-error: true
uses: voxmedia/[email protected]
id: slack
with:
channel: ci
status: STARTED
color: good
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_NOTIFICATIONS_BOT_TOKEN }}
- name: Install Go 1.16.x
uses: actions/setup-go@v2
with:
go-version: 1.16.x
- name: Checkout repo
uses: actions/checkout@v2
- name: Test
run: make vendor && make test
- name: Docker Build
run: make docker-build
- name: Notify Slack Success
continue-on-error: true
if: success()
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_NOTIFICATIONS_BOT_TOKEN }}
uses: voxmedia/[email protected]
with:
message_id: ${{ steps.slack.outputs.message_id }}
channel: ci
status: SUCCESS
color: good
- name: Notify Slack Fail
continue-on-error: true
if: failure()
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_NOTIFICATIONS_BOT_TOKEN }}
uses: voxmedia/[email protected]
with:
message_id: ${{ steps.slack.outputs.message_id }}
channel: ci
status: FAILED
color: danger