forked from ak0rz/ticket-check-action
-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (37 loc) · 1.04 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
name: CI
on: [push]
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 12
- name: Get yarn cache
id: yarn-cache
run: echo "::set-output name=dir::$(yarn cache dir)"
- name: Cache node modules
uses: actions/cache@v1
with:
path: ${{ steps.yarn-cache.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install
run: yarn --prefer-offline --frozen-lockfile --no-progress --non-interactive
- name: Lint
run: yarn lint
- name: Build
run: yarn build
- name: Commit build
if: github.ref == 'refs/heads/master'
uses: endbug/add-and-commit@v4
with:
add: build
force: true
message: Add build code
ref: v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}