-
Notifications
You must be signed in to change notification settings - Fork 1
48 lines (42 loc) · 1.39 KB
/
dependencies.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
name: Update Dependencies
on:
pull_request:
paths:
- 'requirements.txt'
- '.github/**'
types: [labeled]
jobs:
dependencies:
name: Update dependencies
if: >-
(github.event.label.name == 'ready' ||
github.event.label.name == 'dependencies') &&
! (contains(github.event.pull_request.labels.*.name, 'dependencies') &&
contains(github.event.pull_request.labels.*.name, 'ready'))
runs-on: self-hosted
permissions:
contents: write
pull-requests: write
steps:
- name: Checkout Head
uses: actions/checkout@v4
with:
submodules: 'true'
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 1
- name: Update dependencies
run: |
~/test/bin/python -m pip install --upgrade pip
~/test/bin/python -m pip install -U -r requirements.txt
- name: Test documentation
run: |
make lazy-build PYTHON=~/test/bin/python3
- name: Commit dependencies
run: |
~/build/bin/python -m pip install --upgrade pip
~/build/bin/python -m pip install -U -r requirements.txt
- name: Merge PR
if: github.event.pull_request.merged == false
run: |
echo ${{ secrets.GITHUB_TOKEN }} | gh auth login --with-token
gh pr merge ${{ github.event.number }} -d -R ${{ github.repository }} --merge