-
Notifications
You must be signed in to change notification settings - Fork 3
57 lines (49 loc) · 1.78 KB
/
dependencies-update.yaml
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
54
55
56
57
# GitHub Actions workflow to generate a requirements.txt, for all the
# automatic processing that GitHub does, from a Poetry setup file, and
# commit the requirements.txt to the repo
#
# Author: [email protected]
# See GitHub documentation: https://git.io/JJL7O
name: "Update dependency file"
on:
push:
paths:
- 'pyproject.*'
- 'poetry.lock'
jobs:
dependency-update:
name: dependency-update
runs-on: ubuntu-latest
steps:
- name: Checking out latest version of master branch
uses: actions/checkout@master
- name: Setup Python & Poetry and install project with extras
uses: abatilo/[email protected]
with:
python_version: 3.8.0
poetry_version: 1.0
working_directory: "." # optional, defaults to ".'
args: install -E 'autodetect' -E 'net'
- name: Generate requirements.txt (should include extras)
uses: abatilo/[email protected]
with:
python_version: 3.8.0
poetry_version: 1.0
working_directory: "."
args: export -E 'autodetect' -E 'net' -f requirements.txt --without-hashes > requirements.txt
- name: Generate requirements-dev.txt
uses: abatilo/[email protected]
with:
python_version: 3.8.0
poetry_version: 1.0
working_directory: "."
args: export --dev -E 'autodetect' -E 'net' -f requirements.txt --without-hashes > requirements-dev.txt
- name: Commit generated requirements.txt
uses: EndBug/add-and-commit@v4
with:
message: "Commit updated requirements for GH dependency graph + rtd.io"
add: "requirements*.txt"
cwd: "."
force: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}