-
Notifications
You must be signed in to change notification settings - Fork 3
53 lines (49 loc) · 2.06 KB
/
bump-dev-dep.yml
File metadata and controls
53 lines (49 loc) · 2.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
name: Bump a Development Dependency
permissions: {}
on:
workflow_dispatch:
inputs:
package:
description: "Name of the package to bump"
required: true
type: choice
# Hard-coding options for safety
# It's also useful as a record of which packages tend to need bumping
options:
- black
- poetry
- pygments
- requests
- urllib
jobs:
bump-dev-dep:
permissions:
contents: write # Required to commit
pull-requests: write # Required to create PR
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
persist-credentials: false
- name: Setup git user config
run: |
git config --global user.name github-actions[bot]
git config --global user.email 41898282+github-actions[bot]@users.noreply.github.com
- name: Set up uv
uses: astral-sh/setup-uv@3259c6206f993105e3a61b142c2d97bf4b9ef83d # v7.1.0
with:
version: "latest"
enable-cache: true
- name: Bump
# Updates uv.lock and docs/requirements.txt
run: uv run -P $PKG_TO_BUMP prek -a uv-export || true
env:
PKG_TO_BUMP: ${{ inputs.package }}
- name: Create Pull Request
uses: peter-evans/create-pull-request@c0f553fe549906ede9cf27b5156039d195d2ece0 # v8.1.0
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: "Bump `${{ inputs.package }}` for development"
title: "Bump `${{ inputs.package }}` for development"
body: "This PR was automatically generated by the `bump-dev-dep` workflow, triggered by ${{ github.triggering_actor }}."