-
Notifications
You must be signed in to change notification settings - Fork 0
62 lines (55 loc) · 1.74 KB
/
verify.yaml
File metadata and controls
62 lines (55 loc) · 1.74 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
name: Lint
on:
workflow_call:
inputs:
image:
type: string
required: false
default: europe-docker.pkg.dev/ftcs-production/infrastructure/node-build-tools:16
npm_config_nodedir:
type: string
required: false
secrets:
DOCKER_REGISTRY_USER:
required: true
DOCKER_REGISTRY_PASSWORD:
required: true
NPM_AUTH_TOKEN:
required: true
jobs:
lint:
name: Lint
runs-on: [self-hosted, common]
container:
image: ${{ inputs.image }}
credentials:
username: ${{ secrets.DOCKER_REGISTRY_USER }}
password: ${{ secrets.DOCKER_REGISTRY_PASSWORD }}
steps:
- name: Check out repository code
uses: actions/checkout@v4
- name: 'Workaround permissions issue'
run: chown $(whoami):$(whoami) -R .
- name: Cache node modules
id: cache
uses: actions/cache@v4
env:
cache-name: cache-node-modules
with:
path: "**/node_modules"
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
# each time we merge, new version is automatically created and reset the cache.
# restore-keys allows to add a fallback
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
- name: Add NPM token
run: npm config set '//npm.intergiro.tech/:_authToken' ${NPM_AUTH_TOKEN}
env:
NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
- name: Install NPM dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: npm ci
env:
npm_config_nodedir: ${{ inputs.npm_config_nodedir }}
- name: Run lint
run: npm run lint:ci