-
Notifications
You must be signed in to change notification settings - Fork 1
53 lines (45 loc) · 1.57 KB
/
pip-compile.yml
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
on:
workflow_dispatch: {}
schedule:
- cron: "20 20 * * 0"
name: "pip-compile: create PR"
jobs:
pip_compile:
name: pip-compile
runs-on: ubuntu-latest
steps:
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: "3.9"
- name: Install tox
run: pip install tox
- name: pip-compile
uses: technote-space/create-pr-action@v2
with:
EXECUTE_COMMANDS: tox -e pip-compile
COMMIT_MESSAGE: 'chore: scheduled pip-compile'
COMMIT_NAME: 'GitHub Actions'
COMMIT_EMAIL: '[email protected]'
GITHUB_TOKEN: ${{ secrets.PIP_COMPILE_TOKEN }}
PR_BRANCH_PREFIX: deps/
PR_BRANCH_NAME: 'pip-compile'
PR_TITLE: 'chore: scheduled pip-compile'
PR_BODY: '## Update dependencies
This is a scheduled update of Python dependencies within this repo managed by pip-compile.
This change will be submitted automatically within a few days if all checks have
succeeded.'
- name: Look up pull request
uses: juliangruber/find-pull-request-action@v1
id: find-pull-request
with:
branch: deps/pip-compile
# Immediately approve it if we can so it can be merged later
- name: Approve Pull Request
uses: juliangruber/approve-pull-request-action@v1
with:
github-token: ${{ secrets.APPROVAL_TOKEN }}
number: ${{ steps.find-pull-request.outputs.number }}
# allow errors because token may be unset.
continue-on-error: true
if: ${{ steps.find-pull-request.outputs.number }}