-
Notifications
You must be signed in to change notification settings - Fork 15
50 lines (44 loc) · 1.19 KB
/
build.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
name: 'Build'
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- run: yarn install
- run: yarn build
- uses: zcong1993/setup-timezone@master
with:
timezone: Europe/Brussels
- run: yarn test
notify-slack-success:
runs-on: ubuntu-latest
needs: [build]
if: success() && github.ref == 'refs/heads/master'
steps:
- uses: voxmedia/github-action-slack-notify-build@v2
with:
status: SUCCESS. Please release, ${{ github.actor }}.
channel: build_status
color: good
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_NOTIFICATIONS_BOT_TOKEN }}
notify-slack-failure:
runs-on: ubuntu-latest
needs: [build]
if: failure() && github.ref == 'refs/heads/master'
steps:
- uses: voxmedia/github-action-slack-notify-build@v2
with:
status: FAILED
channel: build_status
color: danger
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_NOTIFICATIONS_BOT_TOKEN }}