diff --git a/.github/workflows/pr-lint-filtered.yml b/.github/workflows/pr-lint-filtered.yml new file mode 100644 index 00000000..d3f17fb5 --- /dev/null +++ b/.github/workflows/pr-lint-filtered.yml @@ -0,0 +1,32 @@ +name: PR Lint (only when specific files are changed) + +on: + pull_request: + paths: + - 'app/**' + - 'Dockerfile' + - 'playbook.yml' + - '.github/workflows/**' + +jobs: + lint: + runs-on: ubuntu-latest + + steps: + - name: Check out code + uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: '3.11' + + - name: Install lint dependencies + run: | + python -m pip install --upgrade pip + pip install flake8 + + - name: Run flake8 on app + run: | + flake8 app || echo "Lint warnings (non-fatal for now)" +