Skip to content

Commit

Permalink
fix: only fetch specific env deps for each ci part
Browse files Browse the repository at this point in the history
  • Loading branch information
zoedsoupe committed Sep 8, 2024
1 parent b559a49 commit 7b1baac
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- name: Docker Login
run: echo "$DOCKERHUB_TOKEN" | docker login --username "$DOCKERHUB_USERNAME" --password-stdin
- name: Run build
run: earthly --ci +ci
run: earthly --ci --build-arg MIX_ENV=dev +ci

test:
runs-on: ubuntu-latest
Expand All @@ -34,7 +34,7 @@ jobs:
- name: Docker Login
run: echo "$DOCKERHUB_TOKEN" | docker login --username "$DOCKERHUB_USERNAME" --password-stdin
- name: Run build
run: earthly -P --ci +test
run: earthly -P --ci --build-arg MIX_ENV=test +test

build-prod:
runs-on: ubuntu-latest
Expand All @@ -48,5 +48,5 @@ jobs:
- name: Docker Login
run: echo "$DOCKERHUB_TOKEN" | docker login --username "$DOCKERHUB_USERNAME" --password-stdin
- name: Run build
run: earthly -P --ci --push --build-arg GITHUB_REPO=${{ github.repository }} +docker
run: earthly -P --ci --push --build-arg MIX_ENV=prod --build-arg GITHUB_REPO=${{ github.repository }} +docker

1 change: 1 addition & 0 deletions Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ deps:
ARG ELIXIR=1.16.0
ARG OTP=26.1.2
ARG ALPINE_VERSION=3.18.4
ARG MIX_ENV=test
FROM hexpm/elixir:${ELIXIR}-erlang-${OTP}-alpine-${ALPINE_VERSION}
RUN apk update --no-cache
RUN apk add --no-cache build-base gcc git curl
Expand Down

0 comments on commit 7b1baac

Please sign in to comment.