-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathaction.yml
45 lines (40 loc) · 1.13 KB
/
action.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
name: "Poetry export requirements.txt file"
description: "Export requirements.txt file from poetry"
inputs:
without-hashes:
description: Export requirements.txt file without-hashes
required: false
default: "true"
outfile-name:
description: Name of the output file
required: false
default: "requirements.txt"
args:
description: Additional args to pass to poetry
required: false
default: ""
outputs:
custom-file-name:
description: Name of the output file
value: ${{ inputs.outfile-name }}
runs:
using: composite
steps:
- uses: actions/setup-python@v3
- run: |-
python -m pip install poetry
shell: bash
- run: |-
poetry self add poetry-plugin-export
shell: bash
- if: inputs.without-hashes == 'true'
run: |-
poetry export -f requirements.txt ${{ inputs.args }} --without-hashes --output ${{ inputs.outfile-name }}
shell: bash
- if: inputs.without-hashes == 'false'
run: |-
poetry export -f requirements.txt ${{ inputs.args }} --output ${{ inputs.outfile-name }}
shell: bash
branding:
icon: code
color: blue