-
Notifications
You must be signed in to change notification settings - Fork 2
77 lines (61 loc) · 2.38 KB
/
update-patterns.yml
File metadata and controls
77 lines (61 loc) · 2.38 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
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
name: Update pattern library
on:
workflow_dispatch:
jobs:
update-patterns:
name: Update pattern library
runs-on: ubuntu-latest
steps:
- name: Check out Git repository
uses: actions/checkout@v2
with:
ref: master
submodules: true
- name: Read node version from .nvmrc
id: nvmrc
uses: browniebroke/read-nvmrc-action@v1
- uses: actions/setup-node@v1
with:
node-version: "${{ steps.nvmrc.outputs.node_version }}"
- uses: actions/cache@v2
env:
cache-name: cache-node-modules
with:
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- run: npm ci
- name: Update pattern submodule
run: git submodule update --init --remote
- name: Run linter
run: npm run lint
continue-on-error: false
- name: Run prettier
run: npm run prettier
- name: Add and commit any changes
uses: EndBug/add-and-commit@v5
with:
# The arguments for the `git add` command (see the paragraph below for more info)
# Default: '.'
add: "library"
# The name of the user that will be displayed as the author of the commit
# Default: author of the commit that triggered the run
author_name: decentpattterns community
# The email of the user that will be displayed as the author of the commit
# Default: author of the commit that triggered the run
# author_email: no-reply@decentpatterns.com
# Name of the branch to use, if different from the one that triggered the workflow
# Default: the branch that triggered the run
branch: master
# The message for the commit
# Default: 'Commit from GitHub Actions (name of the workflow)'
message: "Update pattern library"
# Whether to use the --signoff option on `git commit` (only `true` and `false` are accepted)
# Default: false
signoff: true
env:
# This is necessary in order to push a commit to the repo
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Leave this line unchanged