File tree Expand file tree Collapse file tree 1 file changed +43
-0
lines changed
.github/actions/poetry-install Expand file tree Collapse file tree 1 file changed +43
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Poetry install dependencies
2+ description : |
3+ Install python dependencies dependencies with poetry.
4+
5+ This action login on AWS in order to install
6+ Smartway's private packages from AWS CodeArtifact.
7+
8+ Installed dependencies are cached.
9+
10+ Prerequisites: Python & poetry must be installed, and
11+ the repository must be checked-out.
12+
13+ inputs :
14+ aws_account_id :
15+ required : true
16+ install_options :
17+ required : false
18+
19+ runs :
20+ using : " composite"
21+ steps :
22+ - name : Define a cache for the virtual environment based on the dependencies lock file
23+ uses : actions/cache@v5
24+ id : cache-python-deps
25+ with :
26+ path : ./.venv
27+ key : venv-${{ runner.os }}-${{ hashFiles('poetry.lock') }}-${{ inputs.install_options }}
28+ - name : Authenticate on AWS
29+ if : steps.cache-python-deps.outputs.cache-hit != 'true'
30+ id : aws
31+ uses : aws-actions/configure-aws-credentials@v5
32+ with :
33+ aws-region : eu-west-3
34+ role-to-assume : arn:aws:iam::${{ inputs.aws_account_id }}:role/github_oidc_readonly
35+ output-credentials : true
36+ - name : Setup private repository credentials
37+ run : ./scripts/setup_private_repo_credentials.sh
38+ shell : bash
39+ if : steps.cache-python-deps.outputs.cache-hit != 'true'
40+ - name : Install dependencies
41+ run : poetry install ${{ inputs.install_options }}
42+ shell : bash
43+ if : steps.cache-python-deps.outputs.cache-hit != 'true'
You can’t perform that action at this time.
0 commit comments