forked from hmcts/nodejs-logging
-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (39 loc) · 1.04 KB
/
nightly.yml
File metadata and controls
43 lines (39 loc) · 1.04 KB
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
name: nightly
on:
schedule:
- cron: '0 0 * * *'
jobs:
audit:
name: Audit
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Get npm cache directory
id: npm-cache
run: |
echo "::set-output name=dir::$(npm config get cache)"
- uses: actions/cache@v1
with:
path: ${{ steps.npm-cache.outputs.dir }}
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Setup NodeJS 12
uses: actions/setup-node@v1
with:
node-version: '12.x'
- name: Install deps
run: npm ci
- name: Audit dependencies
run: npm audit
- name: Notify slack fail
if: failure()
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
uses: voxmedia/github-action-slack-notify-build@v1
with:
channel: dev
status: FAILED
color: danger