generated from ministryofjustice/template-repository
-
Notifications
You must be signed in to change notification settings - Fork 1
28 lines (26 loc) · 870 Bytes
/
reusable-yaml-lint.yml
File metadata and controls
28 lines (26 loc) · 870 Bytes
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
---
on:
workflow_call:
inputs:
uv_lint_group_name:
type: string
default: ""
description: Optional uv dependency group name.
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Setup UV
uses: astral-sh/setup-uv@e06108dd0aef18192324c70427afc47652e63a82 # v7.5.0
- name: Set up Python
run: uv python install
- name: Install dependencies
if: ${{ inputs.uv_lint_group_name != '' }}
run: uv sync --group ${{ inputs.uv_lint_group_name }}
- name: Lint YAML files (with dependencies)
if: ${{ inputs.uv_lint_group_name != '' }}
run: uv run yamllint .
- name: Lint YAML files (standalone)
if: ${{ inputs.uv_lint_group_name == '' }}
run: uv tool run yamllint .