Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: Mafyuh/iac
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 93b3233d73f89369209f6c89a879c6b5062799b3
Choose a base ref
..
head repository: Mafyuh/iac
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: edc7ccc53ae3fa0c705010dad91d2a12fc39014b
Choose a head ref
Showing with 11 additions and 17 deletions.
  1. +11 −17 .forgejo/workflows/yamllint.yml
28 changes: 11 additions & 17 deletions .forgejo/workflows/yamllint.yml
Original file line number Diff line number Diff line change
@@ -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