Skip to content

Commit c1a2d3c

Browse files
committed
Allow yamllint config to be overridden
Motivation: Gives more flexibility to workflow users. Modifications: Copy the pattern from pythonlint to yamllint Result: Option to override yamllint config
1 parent 580cd8e commit c1a2d3c

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

.github/workflows/soundness.yml

+6-2
Original file line numberDiff line numberDiff line change
@@ -211,8 +211,12 @@ jobs:
211211
- name: Run yamllint
212212
run: |
213213
which yamllint >/dev/null || ( apt-get update && apt-get install -y yamllint )
214-
curl -s https://raw.githubusercontent.com/swiftlang/github-workflows/refs/heads/main/.github/workflows/configs/yamllint.yml > /tmp/yamllint.yml
215-
yamllint --strict --config-file /tmp/yamllint.yml ${GITHUB_WORKSPACE}
214+
cd ${GITHUB_WORKSPACE}
215+
if [ ! -f ".yamllint.yml" ]; then
216+
echo "Downloading default yamllint config file"
217+
curl -s https://raw.githubusercontent.com/swiftlang/github-workflows/refs/heads/main/.github/workflows/configs/yamllint.yml > .yamllint.yml
218+
fi
219+
yamllint --strict --config-file .yamllint.yml .
216220
python-lint-check:
217221
name: Python lint check
218222
if: ${{ inputs.python_lint_check_enabled }}

0 commit comments

Comments
 (0)