Skip to content

Commit 737f531

Browse files
committed
init
0 parents  commit 737f531

File tree

2 files changed

+53
-0
lines changed

2 files changed

+53
-0
lines changed

README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Github Action to setup pip-tools
2+
3+
Versions match pip versions, eg.: `v2023.1` matches pip version `v23.1`.
4+
5+
### Example
6+
7+
```yaml
8+
jobs:
9+
build:
10+
steps:
11+
- uses: actions/checkout@v3
12+
- uses: kotify/[email protected]
13+
```

action.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: "Setup pip-tools"
2+
description: "Setup python and deps using pip-tools"
3+
4+
inputs:
5+
extra-args:
6+
description: path to extra requirements
7+
required: false
8+
default: ""
9+
sync:
10+
description: run pip-sync
11+
required: false
12+
default: true
13+
python-version:
14+
description: python version
15+
required: false
16+
default: "3.10"
17+
pip-version:
18+
description: pip version
19+
required: false
20+
default: "~=23.1.0"
21+
pip-tools-version:
22+
description: pip-tools version
23+
required: false
24+
default: "~=6.13.0"
25+
26+
runs:
27+
using: "composite"
28+
steps:
29+
- uses: actions/setup-python@v4
30+
with:
31+
python-version: ${{ inputs.python-version }}
32+
cache: "pip"
33+
cache-dependency-path: |
34+
backend/requirements.txt
35+
${{ inputs.extra-args }}
36+
- run: pip install --disable-pip-version-check --upgrade "pip${{ inputs.pip-version }}" "pip-tools${{ inputs.pip-tools-version }}" wheel
37+
shell: bash
38+
- run: pip-sync backend/requirements.txt ${{ inputs.extra-args }}
39+
if: ${{ inputs.sync != 'false' }}
40+
shell: bash

0 commit comments

Comments
 (0)