-
Notifications
You must be signed in to change notification settings - Fork 1
45 lines (39 loc) · 1.29 KB
/
ci.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
name: build status
on:
push:
pull_request:
jobs:
build:
name: build status
runs-on: ubuntu-latest
env:
# Force colored output in Github Actions logs
FORCE_COLOR: "1"
steps:
- name: Checkout 🛎️
uses: actions/checkout@v4
- name: Install Node 🔧
uses: actions/setup-node@v4
with:
node-version: 20.11.0
cache: 'npm'
- name: Install Dependencies 🔧
run: npm install
- name: Lint
run: npm run lint
- name: Build
run: npm run build
- name: Send Slack message 🔔
# Trigger even if the job fails
if: always()
# See https://github.com/marketplace/actions/slack-notify for configuration options
uses: rtCamp/action-slack-notify@v2
env:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
SLACK_USERNAME: Github Actions
SLACK_ICON: https://avatars.githubusercontent.com/u/11186132?s=200&v=4
SLACK_FOOTER: ""
SLACK_COLOR: ${{ job.status }}
MSG_MINIMAL: commit,actions url
SLACK_TITLE: "${{ github.event_name == 'push' && 'Pushed into' || 'Running PR' }} `${{ github.ref_name }}`"
SLACK_MESSAGE: ${{ github.event.head_commit.message || github.event.pull_request.title }}