Skip to content

Change continue-on-error to false in workflow #138

Change continue-on-error to false in workflow

Change continue-on-error to false in workflow #138

Workflow file for this run

name: Yaml linting
on:
workflow_call:
push:
branches:
- master
pull_request:
types:
- opened
- synchronize
jobs:
yaml-lint-check:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@cf79a64fed8a943fb1073260883d08fe0dfb4e56
- name: Install yamllint
run: pip install yamllint
- name: Checkout code
uses: actions/checkout@v4
with:
repository: clubcedille/cedille-workflows
path: cedille-workflows
ref: master
sparse-checkout: |
.yamllint.yml
sparse-checkout-cone-mode: false
- name: Lint YAML files
run: |
files=$(echo '${{ steps.changed-files.outputs.all_changed_files }}')
yaml_files=()
for file in $files; do
if [[ -f "$file" && ( "$file" == *.yml || "$file" == *.yaml ) ]]; then
yaml_files+=("$file")
fi
done
if [ ${#yaml_files[@]} -gt 0 ]; then
yamllint -c "${{ github.workspace }}/cedille-workflows/.yamllint.yml" "${yaml_files[@]}"
fi
shell: bash