-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (47 loc) · 1.48 KB
/
dangerci.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
name: Danger CI
on:
pull_request:
branches:
- 'develop'
- 'main'
jobs:
test:
name: Danger CI
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest ]
node-version: [ 16.x ]
runs-on: ${{ matrix.os }}
steps:
# Ref: https://github.com/actions/checkout
- name: Checkout
uses: actions/checkout@v3
# Ref: https://github.com/actions/setup-node
- name: Use NodeJS ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Get yarn cache directory path
id: cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
# Ref: https://github.com/actions/cache
- uses: actions/cache@v3
id: cache # use this to check for `cache-hit` (`steps.cache.outputs.cache-hit != 'true'`)
with:
path: |
**/node_modules
**/.eslintcache
${{ steps.cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-cache-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-cache-${{ hashFiles('**/yarn.lock') }}
- name: Install dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: yarn install
- name: Danger CI Check
uses: danger/danger-js@9.1.8
env:
CI: true
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
DANGER_GITHUB_API_TOKEN: ${{ secrets.GH_TOKEN }}