Compare commits

...

4 commits

Author SHA1 Message Date
edc7ccc53a Merge branch 'main' into renovate/ghcr.io-n8n-io-n8n-1.x
All checks were successful
Lint on PR / Lint YAML files (pull_request) Successful in 4s
2024-12-12 23:50:52 -05:00
c59f0feb45 Update .forgejo/workflows/yamllint.yml 2024-12-12 23:50:46 -05:00
e59688cfd4 Update .forgejo/workflows/yamllint.yml 2024-12-12 23:45:48 -05:00
557c08998a Update .forgejo/workflows/yamllint.yml 2024-12-12 23:44:09 -05:00

View file

@ -1,3 +1,5 @@
name: Lint on PR
on:
pull_request:
types: [opened, synchronize, reopened]
@ -12,23 +14,15 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4
- name: Get modified YAML files
id: get_changed_files
- name: Debug Repository Contents
run: |
if git rev-parse --verify HEAD^ >/dev/null 2>&1; then
CHANGED_FILES=$(git diff --name-only HEAD^ HEAD | grep -E '\.(yml)$' || true)
else
CHANGED_FILES=$(git diff --name-only $(git hash-object -t tree /dev/null) HEAD | grep -E '\.(yml)$' || true)
fi
echo "CHANGED_FILES=$CHANGED_FILES" >> $GITHUB_ENV
pwd
ls -R
- name: Run yamllint on modified files
if: env.CHANGED_FILES != ''
run: |
yamllint $CHANGED_FILES
env:
CHANGED_FILES: ${{ env.CHANGED_FILES }}
- name: Show yamllint version
run: |
yamllint --version
- name: Skip linting if no YAML files are changed
if: env.CHANGED_FILES == ''
run: echo "No YAML files changed in this PR. Skipping lint."
- name: Lint .yml files
run: |
yamllint -d docker/**/*.yml