-
Notifications
You must be signed in to change notification settings - Fork 8
45 lines (39 loc) · 1.31 KB
/
lint.yml
File metadata and controls
45 lines (39 loc) · 1.31 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
on:
workflow_call:
inputs:
type:
description: "Use make or just to install project dependencies"
required: false
type: string
trunk-arguments:
description: Extra arguments to pass to trunk
required: false
type: string
trunk-check-mode:
description: "Trunk check mode. Leave unset to autodetect changes. Set to 'all' to check the entire repository."
required: false
type: string
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- uses: actions/checkout@v4
- name: install just, if required
if: inputs.type == 'just'
uses: extractions/setup-just@69d82fb0233557aec017ef13706851d0694e0f1d #pin@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: install dependencies with make, if required
if: inputs.type == 'make'
run: make dev
- name: install dependencies with just, if required
if: inputs.type == 'just'
run: just dev
- name: trunk check
uses: trunk-io/trunk-action@75699af9e26881e564e9d832ef7dc3af25ec031b #pin@v1.2.4
with:
trunk-token: ${{ secrets.TRUNK_TOKEN }}
check-mode: ${{ inputs.trunk-check-mode }}
arguments: ${{ inputs.trunk-arguments }}