File tree Expand file tree Collapse file tree 2 files changed +33
-0
lines changed
Expand file tree Collapse file tree 2 files changed +33
-0
lines changed Original file line number Diff line number Diff line change 1+ extends : default
2+
3+ rules :
4+ line-length : false
5+ document-start : false
6+ truthy :
7+ check-keys : false # Otherwise we get a false positive on GitHub action's `on` key
Original file line number Diff line number Diff line change 5151 type : string
5252 description : " Container image for the shell check job. Defaults to latest Swift Ubuntu image."
5353 default : " swift:6.0-noble"
54+ yamllint_enabled :
55+ type : boolean
56+ description : " Boolean to enable the YAML lint job. Defaults to true."
57+ default : true
58+ yamllint_container_image :
59+ type : string
60+ description : " Container image for the YAML job. Defaults to latest Swift Ubuntu image."
61+ default : " swift:6.0-noble"
5462
5563# # We are cancelling previously triggered workflow runs
5664concurrency :
@@ -177,3 +185,21 @@ jobs:
177185 run : |
178186 apt-get -qq update && apt-get -qq -y install shellcheck
179187 git ls-files -z '*.sh' | xargs -0 shellcheck
188+
189+ yaml-lint :
190+ name : Lint YAML
191+ if : ${{ inputs.yamllint_enabled }}
192+ runs-on : ubuntu-latest
193+ container :
194+ image : ${{ inputs.yamllint_container_image }}
195+ timeout-minutes : 5
196+ steps :
197+ - name : Checkout repository
198+ uses : actions/checkout@v4
199+ with :
200+ persist-credentials : false
201+ - name : Run yamllint
202+ run : |
203+ apt-get -qq update && apt-get -qq -y install yamllint
204+ curl -s https://raw.githubusercontent.com/swiftlang/github-workflows/refs/heads/main/.github/workflows/utils/yamllint-config.yml > /tmp/yamllint-config.yml
205+ yamllint --strict --config-file /tmp/yamllint-config.yml ${GITHUB_WORKSPACE}
You can’t perform that action at this time.
0 commit comments