-
Notifications
You must be signed in to change notification settings - Fork 0
66 lines (57 loc) · 1.68 KB
/
reusable-js-checks.yaml
File metadata and controls
66 lines (57 loc) · 1.68 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
name: Reusable JS PR checks
on:
workflow_call:
inputs:
app-id:
description: GitHub app id
required: true
type: string
node-version:
description: 'Node version to run this workflow. Default: 22 as it is in action cache'
default: '22'
required: false
type: string
workingDirectory:
description: Working direction for action
default: ./
type: string
required: false
secrets:
private-key:
required: true
jobs:
run:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ${{ inputs.workingDirectory }}
steps:
- uses: actions/create-github-app-token@v1
id: app-token
with:
app-id: ${{ inputs.app-id }}
private-key: ${{ secrets.private-key }}
- uses: actions/checkout@v5
with:
token: ${{ steps.app-token.outputs.token }}
fetch-depth: 0
- name: Prepare JS action
id: start
uses: rees46/workflow/.github/actions/js/prepare-js@master
with:
nodeVersion: ${{ inputs.node-version }}
- name: Lint
if: ${{ !cancelled() }}
env:
TARGET: ${{ github.base_ref }}
run: yarn workspaces foreach -vp --since=origin/$TARGET --jobs=2 run lint
- name: Test
if: ${{ !cancelled() }}
env:
TARGET: ${{ github.base_ref }}
run: yarn workspaces foreach -vp --since=origin/$TARGET --jobs=2 run test
- name: Build
if: ${{ !cancelled() }}
env:
TARGET: ${{ github.base_ref }}
run: yarn workspaces foreach -vp --since=origin/$TARGET --jobs=2 run build