forked from cfengine/documentation
-
Notifications
You must be signed in to change notification settings - Fork 0
30 lines (27 loc) · 850 Bytes
/
Copy pathformatting.yml
File metadata and controls
30 lines (27 loc) · 850 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
29
30
name: Check formatting
on: [push, pull_request]
permissions:
contents: read
jobs:
check:
name: Check formatting using cfengine dev docs-format
runs-on: ubuntu-24.04
steps:
- name: Checks-out repository
uses: actions/checkout@v4
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install tools
run: |
npm install --global prettier
pipx install cfengine black
- name: Run formatting command to (hopefully not) make changes
run: |
# TODO: There are (small) diffs between cfbs pretty and prettier
# https://northerntech.atlassian.net/browse/CFE-4571
cfengine dev format-docs
- name: Check if there are changes
run: |
git diff --exit-code