diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f67e1d1a..75966d25 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 @@ -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 @@ -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 diff --git a/Earthfile b/Earthfile index 557779af..2f5b7d52 100644 --- a/Earthfile +++ b/Earthfile @@ -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