Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also 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
  • 4 commits
  • 1 file changed
  • 1 contributor

Commits on Dec 13, 2024

  1. Update .forgejo/workflows/yamllint.yml

    mafyuh committed Dec 13, 2024
    Copy the full SHA
    557c089 View commit details
  2. Update .forgejo/workflows/yamllint.yml

    mafyuh committed Dec 13, 2024
    Copy the full SHA
    e59688c View commit details
  3. Update .forgejo/workflows/yamllint.yml

    mafyuh committed Dec 13, 2024
    Copy the full SHA
    c59f0fe View commit details
  4. Copy the full SHA
    edc7ccc View commit details
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