TEST!!!! DO NOT MERGE #6
Workflow file for this run
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: "Make Python Files Pretty" | |
| on: | |
| pull_request: | |
| types: [opened, reopened, synchronize] | |
| branches: [dev] | |
| paths: | |
| - "src/**/*.py" | |
| jobs: | |
| lint: | |
| runs-on: ubuntu-latest | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| steps: | |
| - name: Create app access token | |
| uses: actions/create-github-app-token@v1 | |
| id: app-token | |
| with: | |
| app-id: ${{ vars.SCO_COMMIT_APP }} | |
| private-key: ${{ secrets.SCO_APP_KEY }} | |
| # Checkout repository | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| token: ${{ steps.app-token.outputs.token }} | |
| - name: Install Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install ruff | |
| - name: Run Ruff | |
| run: | | |
| ruff format | |
| ruff check --fix --output-format=github . | |
| # Commit the generated PDF back to the repository | |
| - name: Commit & Push changes | |
| uses: EndBug/add-and-commit@v9 | |
| with: | |
| author_name: "Github Action" | |
| author_email: "[email protected]" | |
| message: "Made automatic formatting/lint fixes" | |