Added second workflow that trigers only when a file is changed #1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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)" | |