Skip to content

fix/check ci: #2

fix/check ci: #2 #5

Workflow file for this run

name: Zarf Packages - Lint
on:
pull_request:
branches:
- develop
paths:
- '**/zarf.yaml'
jobs:
lint:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout Code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install Zarf
uses: zarf-dev/setup-zarf@main
with:
version: v0.73.0
- name: Lint Changed Packages
run: |
# Get changed directories
# Use github.base_ref to ensure we compare against the PR's target branch
CHANGED_DIRS=$(git diff --name-only origin/${{ github.base_ref }}...HEAD | grep 'zarf.yaml' | xargs -I {} dirname {} | sort -u)
if [ -z "$CHANGED_DIRS" ]; then
echo "No changes detected in Zarf packages."
exit 0
fi
for DIR in $CHANGED_DIRS; do
echo "📦 Linting: $DIR"
zarf dev lint "$DIR"
done