-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🔧 Add a GitHub action to update Dependabot PRs
- Loading branch information
1 parent
d74d299
commit 135c82c
Showing
1 changed file
with
47 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
--- | ||
name: Amend Dependabot PRs | ||
|
||
on: # yamllint disable-line rule:truthy | ||
push: | ||
branches: | ||
- dependabot/pip/** | ||
pull_request: | ||
branches: | ||
- dependabot/pip/** | ||
workflow_dispatch: # allow this workflow to be manually triggered | ||
|
||
# checkout needs 'contents:read' | ||
# pull request needs 'pull-requests:write' and 'contents:write' | ||
permissions: | ||
contents: write | ||
pull-requests: write | ||
|
||
jobs: | ||
amend_dependabot_prs: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.12' | ||
|
||
- name: Install hatch | ||
run: pip install hatch | ||
|
||
- name: Update hatch requirements | ||
run: | | ||
rm .hatch/requirements*.txt | ||
hatch run true | ||
hatch -e docs run true | ||
hatch -e lint run true | ||
hatch -e test run true | ||
- name: Commit changes | ||
uses: stefanzweifel/git-auto-commit-action@v5.0.1 | ||
with: | ||
commit_message: "[dependabot skip] :wrench: Update Python requirements files" | ||
branch: ${{ github.head_ref }} | ||
|