-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathaction.yml
More file actions
90 lines (77 loc) · 2.77 KB
/
action.yml
File metadata and controls
90 lines (77 loc) · 2.77 KB
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
name: Install requirements
description: Setup python, and install dependencies using uv
inputs:
python-version:
type: string
description: Python version to install
uv-sync:
required: false
default: true
type: boolean
description: Install the python packages with uv sync
project-dir:
type: string
description: What's the relative path to the project?
required: false
default: ./
code-artifact-auth-role-name:
type: string
description: What's the role name to use for CodeArtifact authentication?
required: false
default: no-code-artifact
code-artifact-auth-role-account-id:
type: string
description: What's the AWS Account ID that the role is in?
required: false
code-artifact-auth-region:
type: string
description: What region should the role use?
required: false
runs:
using: composite
steps:
- name: Get version of python
# TODO: be able to pull the default version from the devcontainer.json file
run: |
PYTHON_VERSION="${{ inputs.python-version }}"
echo "PYTHON_VERSION=$PYTHON_VERSION" >> "$GITHUB_ENV"
shell: bash
- name: Setup python
uses: actions/setup-python@v5.6.0
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Install Tooling (Linux)
if: runner.os == 'Linux'
run: sh .devcontainer/install-ci-tooling.sh ${{ env.PYTHON_VERSION }}
shell: bash
- name: Install Tooling (Windows)
if: runner.os == 'Windows'
run: .github/actions/install_deps_uv/install-ci-tooling.ps1 ${{ env.PYTHON_VERSION }}
shell: pwsh
- name: OIDC Auth for CodeArtifact
if: ${{ inputs.code-artifact-auth-role-name != 'no-code-artifact' }}
uses: aws-actions/configure-aws-credentials@v4.1.0
with:
role-to-assume: arn:aws:iam::${{ inputs.code-artifact-auth-role-account-id }}:role/${{ inputs.code-artifact-auth-role-name }}
aws-region: ${{ inputs.code-artifact-auth-region }}
- name: Install Dependencies (Linux)
if: ${{ inputs.uv-sync && runner.os == 'Linux' }}
run: |
sh .devcontainer/manual-setup-deps.sh ${{ env.PYTHON_VERSION }}
shell: bash
- name: Install Dependencies (Windows)
if: ${{ inputs.uv-sync && runner.os == 'Windows' }}
run: .github/actions/install_deps_uv/manual-setup-deps.ps1 ${{ env.PYTHON_VERSION }}
shell: pwsh
- name: List Dependencies (Linux)
if: ${{ inputs.uv-sync && runner.os == 'Linux' }}
working-directory: ${{ inputs.working-directory }}
run: |
uv pip list
shell: bash
- name: List Dependencies (Windows)
if: ${{ inputs.uv-sync && runner.os == 'Windows' }}
working-directory: ${{ inputs.working-directory }}
run: |
& uv pip list
shell: pwsh