File tree Expand file tree Collapse file tree 2 files changed +26
-0
lines changed Expand file tree Collapse file tree 2 files changed +26
-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
5458
5559# # We are cancelling previously triggered workflow runs
5660concurrency :
@@ -177,3 +181,18 @@ jobs:
177181 run : |
178182 apt-get -qq update && apt-get -qq -y install shellcheck
179183 git ls-files -z '*.sh' | xargs -0 shellcheck
184+
185+ yaml-lint :
186+ name : Lint YAML
187+ if : ${{ inputs.yamllint_enabled }}
188+ runs-on : ubuntu-latest
189+ timeout-minutes : 5
190+ steps :
191+ - name : Checkout repository
192+ uses : actions/checkout@v4
193+ with :
194+ persist-credentials : false
195+ - name : Run yamllint
196+ run : |
197+ curl -s https://raw.githubusercontent.com/swiftlang/github-workflows/refs/heads/main/.github/workflows/configs/yamllint.yml > /tmp/yamllint.yml
198+ yamllint --strict --config-file /tmp/yamllint.yml ${GITHUB_WORKSPACE}
You can’t perform that action at this time.
0 commit comments