Skip to content

Merge pull request #56 from Kikkah070/V-기-일쑤이다 #15

Merge pull request #56 from Kikkah070/V-기-일쑤이다

Merge pull request #56 from Kikkah070/V-기-일쑤이다 #15

Workflow file for this run

name: Lint
on: # yamllint disable-line rule:truthy
pull_request:
push:
branches:
- main
jobs:
lint-changed-yaml:
name: Lint changed yaml files
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Get list of changed yaml files
id: changed-files
uses: tj-actions/changed-files@v45
with:
# Required to correctly handle filenames containing non-alphanumeric
# characters
quotepath: "false"
files: |
**/*.yaml
- name: List all changed files
env:
ALL_CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }}
run: |
# Print each changed file on a newline
echo "$ALL_CHANGED_FILES" | tr ' ' '\n'
- name: Run yamllint
run: |
for file in ${{ steps.changed-files.outputs.all_changed_files }}; do
# changed-files adds backslashes to non-ascii file names. We need to
# remove those backslashes before running yamllint
sanitized_file=$(echo "$file" | sed -e 's/\\//g')
# Run yamllint on the sanitized file path
yamllint "$sanitized_file"
done