File tree Expand file tree Collapse file tree 4 files changed +40
-0
lines changed Expand file tree Collapse file tree 4 files changed +40
-0
lines changed Original file line number Diff line number Diff line change 17
17
uses : actions/checkout@v3
18
18
- name : Check GitHub Actions workflows linting.
19
19
run : earthly +check-github-actions-workflows-linting
20
+ formatting :
21
+ name : Formatting
22
+ runs-on : ubuntu-latest
23
+ steps :
24
+ - name : Download Earthly v0.8.6.
25
+ run : " sudo /bin/sh -c 'wget https://github.com/earthly/earthly/releases/download/v0.8.6/earthly-linux-amd64 -O /usr/local/bin/earthly && chmod +x /usr/local/bin/earthly'"
26
+ - name : Checkout code.
27
+ uses : actions/checkout@v3
28
+ - name : Check formatting.
29
+ run : earthly +check-yaml-formatting
Original file line number Diff line number Diff line change @@ -33,6 +33,24 @@ check-conventional-commits-linting:
33
33
RUN ./ci/check-conventional-commits-linting.sh --from-reference "${from_reference}"
34
34
35
35
36
+ yaml-formatting-base :
37
+ FROM +golang-base
38
+ RUN go install github.com/google/yamlfmt/cmd/yamlfmt@v0.10.0
39
+ COPY ".yamlfmt" "./"
40
+ DO +COPY_CI_DATA
41
+
42
+
43
+ check-yaml-formatting :
44
+ FROM +yaml-formatting-base
45
+ RUN ./ci/check-yaml-formatting.sh
46
+
47
+
48
+ fix-yaml-formatting :
49
+ FROM +yaml-formatting-base
50
+ RUN ./ci/fix-yaml-formatting.sh
51
+ SAVE ARTIFACT ".github/" AS LOCAL "./"
52
+
53
+
36
54
check-github-actions-workflows-linting :
37
55
FROM golang:1.20.13
38
56
RUN go install github.com/rhysd/actionlint/cmd/actionlint@v1.6.26
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+
3
+ set -o errexit
4
+ set -o xtrace
5
+
6
+ yamlfmt -lint -dstar .github/** /*
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env sh
2
+
3
+ set -o errexit
4
+ set -o xtrace
5
+
6
+ yamlfmt -dstar ./github/** /*
You can’t perform that action at this time.
0 commit comments