-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaction.yml
34 lines (33 loc) · 891 Bytes
/
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
name: 'Retrieve & Cache Dependencies'
description: 'Get the dependencies and caches them'
branding:
color: yellow
icon: alert-octagon
inputs:
caching:
description: 'Turn on/off caching'
required: false
default: 'true'
poetry-version:
description: 'Poetry version'
required: false
default: '1.8.2'
runs:
using: composite
steps:
- name: Cache dependencies
if: inputs.caching == 'true'
id: cache
uses: actions/cache@v4
with:
path: |
~/.cache/pypoetry
.venv
~/.local
key: poetry-dependencies-${{ hashFiles('**/poetry.lock') }}
- name: Install Poetry
if: steps.cache.outputs.cache-hit != 'true' || inputs.caching != 'true'
run: |
pip3 install poetry==${{ inputs.poetry-version }} -v
poetry install --no-interaction --no-ansi
shell: bash