File tree Expand file tree Collapse file tree 2 files changed +53
-0
lines changed Expand file tree Collapse file tree 2 files changed +53
-0
lines changed Original file line number Diff line number Diff line change 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+ 13+ ` ` `
Original file line number Diff line number Diff line change 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
You can’t perform that action at this time.
0 commit comments