Skip to content

Commit 56a395b

Browse files
committed
pre-commit: try applying generated patch
1 parent 15d0960 commit 56a395b

File tree

3 files changed

+15
-1
lines changed

3 files changed

+15
-1
lines changed

.github/workflows/pre-commit.yml

+10-1
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,13 @@ jobs:
1818
- uses: pre-commit/action@v3.0.1
1919
- run: |
2020
python -m pip install 'ruamel.yaml'
21-
python sort_regressionfiles_yaml.py
21+
if ! python sort_regressionfiles_yaml.py > regressionfiles.diff; then
22+
echo "difference found:"
23+
cat regressionfiles.diff
24+
if ! patch -p1 -i regressionfiles.diff regressionfiles.yaml; then
25+
echo "patch didn't apply cleanly"
26+
else
27+
echo "patch applied cleanly"
28+
fi
29+
exit 1
30+
fi

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
.idea
33

44
regressionfiles.diff
5+
regressionfiles.yaml.orig
56
regressionfiles_nocomments.yaml
67
regressionfiles_sorted.yaml
78

.pre-commit-config.yaml

+4
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,7 @@ repos:
99
rev: "v5.0.0"
1010
hooks:
1111
- id: check-yaml
12+
- repo: https://github.com/Mateusz-Grzelinski/actionlint-py
13+
rev: "v1.7.3.17"
14+
hooks:
15+
- id: actionlint

0 commit comments

Comments
 (0)