refactor: requirements.txt sync & validation #17
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
| # Humans should not manage requirements.txt (bots do) | |
| name: Validate requirements.txt not changed by human | |
| on: | |
| pull_request: | |
| paths: ['requirements.txt'] | |
| types: [opened, synchronize, reopened] | |
| jobs: | |
| reject-requirements-drift: | |
| runs-on: ubuntu-latest | |
| env: | |
| COMMIT_MSG_FILE: .github/commit-messages/requirements_update.txt | |
| # Skip if the last commit was from the bot (prevent unnecessary check) | |
| if: github.event.head_commit.author.name != 'github-actions[bot]' | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 # full history | |
| - name: Validate requirements | |
| uses: ./.github/actions/validate-requirements | |
| with: | |
| allowed_bots: 'github-actions[bot],dependabot[bot]' | |
| commit_message_file: ${{ env.COMMIT_MSG_FILE }} | |