Skip to content

Commit 8ddce24

Browse files
committed
Use mise for more things
1 parent b6ce185 commit 8ddce24

File tree

4 files changed

+789
-774
lines changed

4 files changed

+789
-774
lines changed

.github/workflows/main.yaml

+6-5
Original file line numberDiff line numberDiff line change
@@ -80,13 +80,14 @@ jobs:
8080
- name: Sign the container image
8181
if: github.ref == 'refs/heads/main'
8282
run: cosign sign --yes ${{ steps.imgdigest.outputs.digest }}
83-
- name: "Setup Python, Poetry and Dependencies"
83+
- name: Install utilities using mise
84+
uses: jdx/mise-action@v2
8485
if: github.ref == 'refs/heads/main'
85-
uses: packetcoders/action-setup-cache-python-poetry@main
8686
with:
87-
python-version: 3.9
88-
poetry-version: 1.5.1
89-
install-args: --only=sbom-tools
87+
install_args: python poetry
88+
- name: Install SBOM tools
89+
run: poetry install --only=sbom-tools
90+
if: github.ref == 'refs/heads/main'
9091
- name: Create SBOM
9192
if: github.ref == 'refs/heads/main'
9293
run: |

Earthfile

+17-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,22 @@ WORKDIR /app
55
ARG EARTHLY_GIT_PROJECT_NAME
66
ARG --global CACHE_BASE=ghcr.io/$EARTHLY_GIT_PROJECT_NAME
77

8+
INSTALL_MISE:
9+
FUNCTION
10+
ENV MISE_DATA_DIR="/mise"
11+
ENV MISE_CONFIG_DIR="/mise"
12+
ENV MISE_CACHE_DIR="/mise/cache"
13+
ENV MISE_INSTALL_PATH="/usr/local/bin/mise"
14+
ENV PATH="/mise/shims:$PATH"
15+
16+
COPY mise.toml .
17+
RUN curl https://mise.run | sh && \
18+
mise trust /app/mise.toml
19+
20+
821
build:
9-
RUN pip install poetry
22+
DO +INSTALL_MISE
23+
RUN mise install poetry
1024
ENV POETRY_VIRTUALENVS_IN_PROJECT=true
1125

1226
COPY pyproject.toml poetry.lock .
@@ -30,7 +44,8 @@ tests:
3044

3145
integration-tests:
3246
DO github.com/earthly/lib+INSTALL_DIND
33-
RUN pip install poetry
47+
DO +INSTALL_MISE
48+
RUN mise install poetry
3449
ENV POETRY_VIRTUALENVS_IN_PROJECT=true
3550
COPY --dir +build/.venv .
3651
COPY --dir +build/dataproduct_apps .

mise.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
[tools]
22
earthly = "latest"
3-
poetry = "2.0.1"
3+
poetry = "2.1.1"
44
python = "3.9"

0 commit comments

Comments
 (0)