-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: update python requirements on schedule
- Loading branch information
1 parent
e3194d9
commit 95dd9b1
Showing
1 changed file
with
41 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,41 @@ | ||
name: Bump python requirements | ||
on: | ||
schedule: | ||
- cron: '30 5 15 * *' # 15th of every month, 05:30 | ||
push: | ||
branches: | ||
- 'feat/cron-bump-python-requirements' | ||
|
||
jobs: | ||
create-pull-request: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
# action runners have bazelisk: https://github.com/bazelbuild/bazel/issues/11062 | ||
- run: mkdir -p "${TEST_TMPDIR}" | ||
- name: Mount bazel cache # Optional | ||
uses: actions/cache@v3 | ||
with: | ||
# needs to be an absolute path, not a variable; I've made it match TEST_TMPDIR above | ||
path: /tmp/bazel | ||
key: _bazel_runner | ||
- name: Update requirements | ||
# https://stackoverflow.com/questions/68057744/create-pull-request-with-github-action | ||
run: | | ||
bazel run //lib/python:requirements.update | ||
bazel run //lib/python:vendor_requirements | ||
- name: Create Pull Request | ||
permissions: | ||
- contents: write | ||
- pull-requests: write | ||
uses: peter-evans/[email protected] | ||
with: | ||
add-paths: lib/python/* | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
commit-message: 'chore: bump python requirements' | ||
title: 'Bump Python Requirements' | ||
body: > | ||
This PR is auto-generated by | ||
[create-pull-request](https://github.com/peter-evans/create-pull-request). | ||
labels: dependencies | ||
branch: chore/bump-python-requirements |