-
-
Notifications
You must be signed in to change notification settings - Fork 2k
49 lines (46 loc) · 1.31 KB
/
post-dependabot.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
name: Dependabot post-update
on:
pull_request_target:
action: [opened, synchronize, reopened]
branches:
- 'master'
- '[0-9].[0-9]+'
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
cancel-in-progress: true
permissions: {}
jobs:
post-update:
permissions:
pull-requests: read # for gh pr checkout
contents: write # to push code in repo (stefanzweifel/git-auto-commit-action)
if: ${{ github.actor == 'dependabot[bot]' }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Login
run: |
echo "${{ secrets.GITHUB_TOKEN }}" | gh auth login --with-token
- name: Checkout
run: |
gh pr checkout ${{ github.event.pull_request.number }}
- name: Setup Python
uses: actions/setup-python@v4
- name: Cache PyPI
uses: actions/[email protected]
with:
key: post-update
path: ~/.cache/pip
restore-keys: |
post-update-
- name: Update pip-tools
run: |
python -m pip install -U pip-tools
- name: Run pip-compile
run: |
make compile-deps
- name: Commit and push if needed
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: Recompile requirements/constraints.txt