From e3f33ca3ef06f19ceedfba24a1ba65d2f528c999 Mon Sep 17 00:00:00 2001 From: Santi Lertsumran Date: Thu, 29 Aug 2024 15:29:09 +0700 Subject: [PATCH] ci: fix build failed --- .github/workflows/build.yml | 1 + Dockerfile | 5 +---- Makefile | 2 +- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4bb6397..b15bfd2 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -23,6 +23,7 @@ jobs: rebar3-version: "3" - run: gleam deps download - run: gleam build + - run: cd build && gleam export erlang-shipment - name: 'Login to GitHub Container Registry' uses: docker/login-action@v1 diff --git a/Dockerfile b/Dockerfile index c0681da..959f909 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,10 +4,7 @@ FROM ghcr.io/gleam-lang/gleam:v1.4.1-erlang-alpine COPY . /build/ # Compile the project -RUN cd /build \ -&& gleam export erlang-shipment \ -&& mv build/erlang-shipment /app \ -&& rm -r /build \ +RUN mv /build/erlang-shipment /app \ && addgroup -S crappy \ && adduser -S crappy -G crappy \ && chown -R crappy /app diff --git a/Makefile b/Makefile index dc5a978..66cbb50 100644 --- a/Makefile +++ b/Makefile @@ -8,4 +8,4 @@ install-tailwind-cli: e2e-test: cd e2e && yarn start docker-build: - docker build -t crappy-board:latest . + cd build && gleam export erlang-shipment && cd .. && docker build -t crappy-board:latest .