diff --git a/.github/workflows/cron-bump-requirements.yml b/.github/workflows/cron-bump-requirements.yml new file mode 100644 index 0000000..df2d10c --- /dev/null +++ b/.github/workflows/cron-bump-requirements.yml @@ -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 + permissions: + - contents: write + - pull-requests: write + 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 + uses: peter-evans/create-pull-request@v3.10.0 + 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