-
Notifications
You must be signed in to change notification settings - Fork 3
45 lines (39 loc) · 1.17 KB
/
yaml.yaml
File metadata and controls
45 lines (39 loc) · 1.17 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
# Do not edit this file! Make a pull request on changing
# github/workflows/yaml.yaml in
# https://github.com/itk-dev/devops_itkdev-docker if need be.
### ### YAML
###
### Validates YAML files.
###
### #### Assumptions
###
### 1. A docker compose service named `prettier` for running
### [Prettier](https://prettier.io/) exists.
###
### #### Symfony YAML
###
### Symfony's YAML config files use 4 spaces for indentation and single quotes.
### Therefore we use a [Prettier configuration
### file](https://prettier.io/docs/configuration), `.prettierrc.yaml`, to make
### Prettier format YAML files in the `config/` folder like Symfony expects.
name: YAML
on:
pull_request:
paths: &paths
- "**/*.yml"
- "**/*.yaml"
push:
branches:
- main
- develop
paths: *paths
jobs:
yaml-lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Create docker network
run: |
docker network create frontend
- run: |
docker compose run --rm prettier '**/*.{yml,yaml}' --check --no-error-on-unmatched-pattern