feat(CI): Add a new task to automatically assign a team label on a dependabot PR #1
This file contains 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: Assign Dependabot PRs | |
on: | |
pull_request: | |
jobs: | |
label_pr: | |
if: github.actor == 'dependabot[bot]' | |
permissions: | |
pull-requests: write | |
env: | |
GH_TOKEN: ${{ github.token }} | |
PR_ID: ${{ github.event.number }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: "3.11" | |
cache: "pip" | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt | |
- name: Add label according to modified dependency | |
run: | | |
invoke add-team-label --pr-id $PR_ID |