-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: switched to earthly for ci builds
- Loading branch information
1 parent
8738a36
commit 96c2a9d
Showing
10 changed files
with
80 additions
and
274 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
node_modules | ||
dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
VERSION 0.8 | ||
|
||
build-all: | ||
BUILD \ | ||
--platform=linux/amd64 \ | ||
--platform=linux/arm64 \ | ||
+build-image | ||
|
||
build: | ||
FROM node:20.11.1-alpine3.19 | ||
WORKDIR /build | ||
COPY . . | ||
RUN \ | ||
yarn workspaces focus --all && \ | ||
yarn workspace frontend run build && \ | ||
yarn workspace api run build:prod && \ | ||
yarn run pkg && \ | ||
# rename x64 to amd64 | ||
for f in ./dist/releases/*; do mv "$f" "$(echo "$f" | sed s/x64/amd64/)"; done | ||
SAVE ARTIFACT ./dist/releases | ||
|
||
build-image: | ||
ARG TARGETPLATFORM | ||
ARG TARGETARCH | ||
ARG TAG=latest | ||
ARG --required COMMIT | ||
FROM --platform=$TARGETPLATFORM scratch | ||
ENV DATA_DIR=/data | ||
ENV HTTP_ADDR=0.0.0.0 | ||
ENV HTTP_PORT=7777 | ||
COPY \ | ||
--platform=linux/amd64 \ | ||
(+build/releases/petio-linuxstatic-$TARGETARCH) ./petio | ||
VOLUME ["/data"] | ||
ENTRYPOINT ["/petio"] | ||
SAVE IMAGE --push ghcr.io/petio-team/petio:$TAG | ||
SAVE IMAGE --push ghcr.io/petio-team/petio:$COMMIT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.