Skip to content

refactor: requirements.txt sync & validation #17

refactor: requirements.txt sync & validation

refactor: requirements.txt sync & validation #17

# 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 }}