-
Notifications
You must be signed in to change notification settings - Fork 0
101 lines (83 loc) · 2.39 KB
/
audit.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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
name: Audit
on:
push:
schedule:
- cron: '0 0 * * *'
jobs:
bundler-audit:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Use Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7.1
- name: Cache bundler
uses: actions/cache@v1
env:
cache-version: v1
with:
path: vendor/bundle
key: ${{ runner.os }}-bundler-${{ env.cache-version }}-${{ hashFiles('**/Gemfile.lock') }}
restore-keys: |
${{ runner.os }}-bundler-${{ env.cache-version }}-
${{ runner.os }}-bundler-
${{ runner.os }}-
- name: Install dependencies
run: |
gem install bundler
bundle config set path vendor/bundle
bundle check || bundle install --deployment
- name: Audit gems
run: bundle exec bundle audit check --update
npm-audit:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: 12.x
- name: Cache npm
uses: actions/cache@v1
env:
cache-version: v1
with:
path: ~/.npm
key: ${{ runner.os }}-npm-${{ env.cache-version }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-npm-${{ env.cache-version }}-
${{ runner.os }}-npm-
${{ runner.os }}-
- name: Install dependencies
run: npm ci
- name: Audit npm
run: npm audit
yarn-audit:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
ref: master
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: 12.x
- name: Cache yarn
uses: actions/cache@v1
env:
cache-version: v1
with:
path: ~/.cache/yarn
key: ${{ runner.os }}-yarn-${{ env.cache-version }}-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-${{ env.cache-version }}-
${{ runner.os }}-yarn-
${{ runner.os }}-
- name: Install dependencies
run: yarn install --check-files --cache-folder ~/.cache/yarn
- name: Audit yarn
run: yarn audit