From cccda3ad3aa166e937bf69e96a6f5d264340eb17 Mon Sep 17 00:00:00 2001 From: Alexander Belanger Date: Tue, 19 Dec 2023 14:09:07 -0500 Subject: [PATCH 1/9] chore: update taskfile --- Taskfile.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Taskfile.yaml b/Taskfile.yaml index 2827b9397..53a5aa757 100644 --- a/Taskfile.yaml +++ b/Taskfile.yaml @@ -55,7 +55,7 @@ tasks: - go run github.com/steebchen/prisma-client-go generate generate-proto: cmds: - - sh ./hack/dev/proto.sh + - sh ./hack/proto/proto.sh generate-sqlc: cmds: - npx --yes prisma migrate diff --from-empty --to-schema-datasource prisma/schema.prisma --script > internal/repository/prisma/dbsqlc/schema.sql From a1259eb14fedb71e0a22cc0270f92af05aefbfba Mon Sep 17 00:00:00 2001 From: Alexander Belanger Date: Tue, 19 Dec 2023 14:10:50 -0500 Subject: [PATCH 2/9] chore: add docker builds --- .github/workflows/pre-release.yaml | 56 +++++++++++++ api/v1/server/run/run.go | 44 +++++----- build/package/engine.Dockerfile | 66 +++++++++++++++ build/package/frontend.Dockerfile | 18 +++++ .../package/frontend.Dockerfile.dockerignore | 9 +++ build/package/nginx.conf | 16 ++++ build/package/server.Dockerfile | 67 +++++++++++++++ build/package/servers.Dockerfile | 81 +++++++++++++++++++ cmd/hatchet-api/main.go | 46 ++++++++++- cmd/hatchet-engine/main.go | 43 ++++++++-- .../molecules/brush-chart/brush-chart.tsx | 4 +- go.mod | 2 + go.sum | 6 ++ hack/{dev => proto}/proto.sh | 0 14 files changed, 428 insertions(+), 30 deletions(-) create mode 100644 .github/workflows/pre-release.yaml create mode 100644 build/package/engine.Dockerfile create mode 100644 build/package/frontend.Dockerfile create mode 100644 build/package/frontend.Dockerfile.dockerignore create mode 100644 build/package/nginx.conf create mode 100644 build/package/server.Dockerfile create mode 100644 build/package/servers.Dockerfile rename hack/{dev => proto}/proto.sh (100%) diff --git a/.github/workflows/pre-release.yaml b/.github/workflows/pre-release.yaml new file mode 100644 index 000000000..e72a5aa50 --- /dev/null +++ b/.github/workflows/pre-release.yaml @@ -0,0 +1,56 @@ +on: + push: + tags: + - "v*" # Push events to matching v*, i.e. v1.0, v20.15.10 + branches: + - belanger/docker-builds +name: Create prerelease w/ binaries and static assets +jobs: + build-push-hatchet-api: + name: Build and push a new hatchet-api docker image + runs-on: ubuntu-latest + steps: + - name: Get tag name + id: tag_name + run: echo "tag=${GITHUB_TAG/refs\/tags\//}" >> $GITHUB_OUTPUT + env: + GITHUB_TAG: ${{ github.ref }} + - name: Checkout + uses: actions/checkout@v3 + - name: Login to GHCR + id: login-ghcr + run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin + - name: Build + run: | + DOCKER_BUILDKIT=1 docker build -f ./build/package/servers.Dockerfile \ + -t ghcr.io/hatchet-dev/hatchet/hatchet-api:${{steps.tag_name.outputs.tag}} \ + --build-arg SERVER_TARGET=api \ + --build-arg VERSION=${{steps.tag_name.outputs.tag}} \ + . + - name: Push to GHCR + run: | + docker push ghcr.io/hatchet-dev/hatchet/hatchet-api:${{steps.tag_name.outputs.tag}} + build-push-hatchet-engine: + name: Build and push a new hatchet-engine docker image + runs-on: ubuntu-latest + steps: + - name: Get tag name + id: tag_name + run: echo "tag=${GITHUB_TAG/refs\/tags\//}" >> $GITHUB_OUTPUT + env: + GITHUB_TAG: ${{ github.ref }} + - name: Checkout + uses: actions/checkout@v3 + - name: Login to GHCR + id: login-ghcr + run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin + - name: Build + run: | + DOCKER_BUILDKIT=1 docker build -f ./build/package/servers.Dockerfile \ + -t ghcr.io/hatchet-dev/hatchet/hatchet-engine:${{steps.tag_name.outputs.tag}} \ + --build-arg SERVER_TARGET=engine \ + --build-arg VERSION=${{steps.tag_name.outputs.tag}} \ + . + - name: Push to GHCR + run: | + docker push ghcr.io/hatchet-dev/hatchet/hatchet-engine:${{steps.tag_name.outputs.tag}} diff --git a/api/v1/server/run/run.go b/api/v1/server/run/run.go index 41ff4a097..e4cd165c8 100644 --- a/api/v1/server/run/run.go +++ b/api/v1/server/run/run.go @@ -1,6 +1,7 @@ package run import ( + "context" "fmt" "github.com/hatchet-dev/hatchet/api/v1/server/authn" @@ -47,7 +48,9 @@ func NewAPIServer(config *server.ServerConfig) *APIServer { } } -func (t *APIServer) Run() error { +func (t *APIServer) Run(ctx context.Context) error { + errCh := make(chan error) + oaspec, err := gen.GetSwagger() if err != nil { return err @@ -140,28 +143,27 @@ func (t *APIServer) Run() error { gen.RegisterHandlers(e, myStrictApiHandler) - if err := e.Start(fmt.Sprintf(":%d", t.config.Runtime.Port)); err != nil { + go func() { + if err := e.Start(fmt.Sprintf(":%d", t.config.Runtime.Port)); err != nil { + errCh <- err + } + }() + +Loop: + for { + select { + case err := <-errCh: + return err + case <-ctx.Done(): + break Loop + } + } + + err = e.Shutdown(ctx) + + if err != nil { return err } return nil } - -// func IDGetter[T any](getter func(id string) (T, error), parentGetter func(val T) string) populator.PopulatorFunc { -// return func(config *server.ServerConfig, parent *populator.PopulatedResourceNode, id string) (res *populator.PopulatorResult, err error) { -// gotVal, err := getter(id) -// if err != nil { -// return nil, err -// } - -// res = &populator.PopulatorResult{ -// Resource: gotVal, -// } - -// if parentGetter != nil { -// res.ParentID = parentGetter(gotVal) -// } - -// return res, nil -// } -// } diff --git a/build/package/engine.Dockerfile b/build/package/engine.Dockerfile new file mode 100644 index 000000000..97e9cf175 --- /dev/null +++ b/build/package/engine.Dockerfile @@ -0,0 +1,66 @@ +# Base Go environment +# ------------------- +FROM golang:1.21-alpine as base +WORKDIR /hatchet + +RUN apk update && apk add --no-cache gcc musl-dev git protoc protobuf-dev + +COPY go.mod go.sum ./ +COPY /api-contracts ./api-contracts +COPY /internal ./internal +COPY /pkg ./pkg +COPY /hack ./hack +COPY /prisma ./prisma +COPY /cmd ./cmd + +RUN go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.28 +RUN go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.2 +RUN go install github.com/deepmap/oapi-codegen/v2/cmd/oapi-codegen@latest + +RUN --mount=type=cache,target=$GOPATH/pkg/mod \ + go mod download + +# prefetch the binaries, so that they will be cached and not downloaded on each change +RUN go run github.com/steebchen/prisma-client-go prefetch + +# generate the Prisma Client Go client +RUN go run github.com/steebchen/prisma-client-go generate --generator go + +# OpenAPI bundle environment +# ------------------------- +FROM node:16-alpine as build-openapi +WORKDIR /openapi + +COPY /api-contracts/openapi ./openapi + +RUN npm install -g npm@8.1 + +RUN npm install -g @apidevtools/swagger-cli prisma + +RUN swagger-cli bundle ./openapi/openapi.yaml --outfile ./bin/oas/openapi.yaml --type yaml + +# Go build environment +# -------------------- +FROM base AS build-go + +RUN sh ./hack/proto/proto.sh + +COPY --from=build-openapi /openapi/bin/oas/openapi.yaml ./bin/oas/openapi.yaml + +# build oapi +RUN oapi-codegen -config ./api/v1/server/oas/gen/codegen.yaml ./bin/oas/openapi.yaml + +RUN --mount=type=cache,target=/root/.cache/go-build \ + --mount=type=cache,target=$GOPATH/pkg/mod \ + go build -ldflags="-w -s" -a -o ./bin/hatchet-engine ./cmd/hatchet-engine + +# Deployment environment +# ---------------------- +FROM alpine AS deployment + +RUN apk update && apk add --no-cache gcc musl-dev + +COPY --from=build-go /hatchet/bin/hatchet-engine /hatchet/ + +EXPOSE 8080 +CMD /hatchet/hatchet-engine diff --git a/build/package/frontend.Dockerfile b/build/package/frontend.Dockerfile new file mode 100644 index 000000000..4d930924f --- /dev/null +++ b/build/package/frontend.Dockerfile @@ -0,0 +1,18 @@ +FROM node:18-alpine as build + +WORKDIR /app +COPY ./frontend/app/package.json ./frontend/app/package-lock.json ./ +RUN npm install +COPY ./frontend/app ./ +RUN npm run build + +# Stage 2: Serve the built app with NGINX +FROM nginx:alpine + +ARG APP_TARGET=client + +COPY ./build/package/nginx.conf /etc/nginx/nginx.conf +RUN rm -rf /usr/share/nginx/html/* +COPY --from=build /app/dist /usr/share/nginx/html +EXPOSE 80 +CMD ["nginx", "-g", "daemon off;"] diff --git a/build/package/frontend.Dockerfile.dockerignore b/build/package/frontend.Dockerfile.dockerignore new file mode 100644 index 000000000..f15ff8b87 --- /dev/null +++ b/build/package/frontend.Dockerfile.dockerignore @@ -0,0 +1,9 @@ +/frontend/**/node_modules +*.log +/frontend/**/.DS_Store +/frontend/**/.env +/frontend/**/.cache +/frontend/**/public/build +/frontend/**/build +/frontend/**/dist +/frontend/**/.turbo diff --git a/build/package/nginx.conf b/build/package/nginx.conf new file mode 100644 index 000000000..246fc3a3a --- /dev/null +++ b/build/package/nginx.conf @@ -0,0 +1,16 @@ +worker_processes 4; + +events { worker_connections 1024; } + +http { + server { + listen 80; + root /usr/share/nginx/html; + include /etc/nginx/mime.types; + index index.html index.htm; + + location / { + try_files $uri /index.html; + } + } +} \ No newline at end of file diff --git a/build/package/server.Dockerfile b/build/package/server.Dockerfile new file mode 100644 index 000000000..6a5ad52ae --- /dev/null +++ b/build/package/server.Dockerfile @@ -0,0 +1,67 @@ +# Base Go environment +# ------------------- +FROM golang:1.21-alpine as base +WORKDIR /hatchet + +RUN apk update && apk add --no-cache gcc musl-dev git protoc protobuf-dev + +COPY go.mod go.sum ./ +COPY /api ./api +COPY /api-contracts ./api-contracts +COPY /internal ./internal +COPY /pkg ./pkg +COPY /hack ./hack +COPY /prisma ./prisma +COPY /cmd ./cmd + +RUN go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.28 +RUN go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.2 +RUN go install github.com/deepmap/oapi-codegen/v2/cmd/oapi-codegen@latest + +RUN --mount=type=cache,target=$GOPATH/pkg/mod \ + go mod download + +# prefetch the binaries, so that they will be cached and not downloaded on each change +RUN go run github.com/steebchen/prisma-client-go prefetch + +# generate the Prisma Client Go client +RUN go run github.com/steebchen/prisma-client-go generate --generator go + +# OpenAPI bundle environment +# ------------------------- +FROM node:16-alpine as build-openapi +WORKDIR /openapi + +COPY /api-contracts/openapi ./openapi + +RUN npm install -g npm@8.1 + +RUN npm install -g @apidevtools/swagger-cli prisma + +RUN swagger-cli bundle ./openapi/openapi.yaml --outfile ./bin/oas/openapi.yaml --type yaml + +# Go build environment +# -------------------- +FROM base AS build-go + +RUN sh ./hack/proto/proto.sh + +COPY --from=build-openapi /openapi/bin/oas/openapi.yaml ./bin/oas/openapi.yaml + +# build oapi +RUN oapi-codegen -config ./api/v1/server/oas/gen/codegen.yaml ./bin/oas/openapi.yaml + +RUN --mount=type=cache,target=/root/.cache/go-build \ + --mount=type=cache,target=$GOPATH/pkg/mod \ + go build -ldflags="-w -s" -a -o ./bin/hatchet-api ./cmd/hatchet-api + +# Deployment environment +# ---------------------- +FROM alpine AS deployment + +RUN apk update && apk add --no-cache gcc musl-dev + +COPY --from=build-go /hatchet/bin/hatchet-api /hatchet/ + +EXPOSE 8080 +CMD /hatchet/hatchet-api diff --git a/build/package/servers.Dockerfile b/build/package/servers.Dockerfile new file mode 100644 index 000000000..a473f7490 --- /dev/null +++ b/build/package/servers.Dockerfile @@ -0,0 +1,81 @@ +# Base Go environment +# ------------------- +FROM golang:1.21-alpine as base +WORKDIR /hatchet + +RUN apk update && apk add --no-cache gcc musl-dev git protoc protobuf-dev + +COPY go.mod go.sum ./ +COPY /api ./api +COPY /api-contracts ./api-contracts +COPY /internal ./internal +COPY /pkg ./pkg +COPY /hack ./hack +COPY /prisma ./prisma +COPY /cmd ./cmd + +RUN go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.28 +RUN go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.2 +RUN go install github.com/deepmap/oapi-codegen/v2/cmd/oapi-codegen@latest + +RUN --mount=type=cache,target=$GOPATH/pkg/mod \ + go mod download + +# prefetch the binaries, so that they will be cached and not downloaded on each change +RUN go run github.com/steebchen/prisma-client-go prefetch + +# generate the Prisma Client Go client +RUN go run github.com/steebchen/prisma-client-go generate --generator go + +# OpenAPI bundle environment +# ------------------------- +FROM node:16-alpine as build-openapi +WORKDIR /openapi + +COPY /api-contracts/openapi ./openapi + +RUN npm install -g npm@8.1 + +RUN npm install -g @apidevtools/swagger-cli prisma + +RUN swagger-cli bundle ./openapi/openapi.yaml --outfile ./bin/oas/openapi.yaml --type yaml + +# Go build environment +# -------------------- +FROM base AS build-go + +ARG VERSION=v0.1.0-alpha.0 + +# can be set to "api" or "engine" +ARG SERVER_TARGET + +# check if the target is empty or not set to api or engine +RUN if [ -z "$SERVER_TARGET" ] || [ "$SERVER_TARGET" != "api" ] && [ "$SERVER_TARGET" != "engine" ]; then \ + echo "SERVER_TARGET must be set to 'api' or 'engine'"; \ + exit 1; \ + fi + +RUN sh ./hack/proto/proto.sh + +COPY --from=build-openapi /openapi/bin/oas/openapi.yaml ./bin/oas/openapi.yaml + +# build oapi +RUN oapi-codegen -config ./api/v1/server/oas/gen/codegen.yaml ./bin/oas/openapi.yaml + +RUN --mount=type=cache,target=/root/.cache/go-build \ + --mount=type=cache,target=$GOPATH/pkg/mod \ + go build -ldflags="-w -s -X 'main.Version=${VERSION}'" -a -o ./bin/hatchet-${SERVER_TARGET} ./cmd/hatchet-${SERVER_TARGET} + +# Deployment environment +# ---------------------- +FROM alpine AS deployment + +# can be set to "api" or "engine" +ARG SERVER_TARGET=engine + +RUN apk update && apk add --no-cache gcc musl-dev + +COPY --from=build-go /hatchet/bin/hatchet-${SERVER_TARGET} /hatchet/ + +EXPOSE 8080 +CMD /hatchet/hatchet-${SERVER_TARGET} diff --git a/cmd/hatchet-api/main.go b/cmd/hatchet-api/main.go index 4fc8b6a8b..e4535e218 100644 --- a/cmd/hatchet-api/main.go +++ b/cmd/hatchet-api/main.go @@ -1,11 +1,52 @@ package main import ( + "fmt" + "os" + "github.com/hatchet-dev/hatchet/api/v1/server/run" + "github.com/hatchet-dev/hatchet/cmd/cmdutils" "github.com/hatchet-dev/hatchet/internal/config/loader" + "github.com/spf13/cobra" ) +var printVersion bool + +// rootCmd represents the base command when called without any subcommands +var rootCmd = &cobra.Command{ + Use: "hatchet-api", + Short: "hatchet-api runs a Hatchet instance.", + Run: func(cmd *cobra.Command, args []string) { + if printVersion { + fmt.Println(Version) + os.Exit(0) + } + + cf := &loader.ConfigLoader{} + interruptChan := cmdutils.InterruptChan() + + startServerOrDie(cf, interruptChan) + }, +} + +// Version will be linked by an ldflag during build +var Version string = "v0.1.0-alpha.0" + func main() { + rootCmd.PersistentFlags().BoolVar( + &printVersion, + "version", + false, + "print version and exit.", + ) + + if err := rootCmd.Execute(); err != nil { + fmt.Println(err) + os.Exit(1) + } +} + +func startServerOrDie(configLoader *loader.ConfigLoader, interruptCh <-chan interface{}) { // init the repository cf := &loader.ConfigLoader{} @@ -15,9 +56,12 @@ func main() { panic(err) } + ctx, cancel := cmdutils.InterruptContext(interruptCh) + defer cancel() + runner := run.NewAPIServer(sc) - err = runner.Run() + err = runner.Run(ctx) if err != nil { panic(err) diff --git a/cmd/hatchet-engine/main.go b/cmd/hatchet-engine/main.go index 38917ce37..c9d263083 100644 --- a/cmd/hatchet-engine/main.go +++ b/cmd/hatchet-engine/main.go @@ -14,12 +14,46 @@ import ( "github.com/hatchet-dev/hatchet/internal/services/ingestor" "github.com/hatchet-dev/hatchet/internal/services/jobscontroller" "github.com/hatchet-dev/hatchet/internal/services/ticker" + "github.com/spf13/cobra" ) +var printVersion bool + +// rootCmd represents the base command when called without any subcommands +var rootCmd = &cobra.Command{ + Use: "hatchet-engine", + Short: "hatchet-engine runs the Hatchet engine.", + Run: func(cmd *cobra.Command, args []string) { + if printVersion { + fmt.Println(Version) + os.Exit(0) + } + + cf := &loader.ConfigLoader{} + interruptChan := cmdutils.InterruptChan() + + startEngineOrDie(cf, interruptChan) + }, +} + +// Version will be linked by an ldflag during build +var Version string = "v0.1.0-alpha.0" + func main() { - // init the repository - cf := &loader.ConfigLoader{} + rootCmd.PersistentFlags().BoolVar( + &printVersion, + "version", + false, + "print version and exit.", + ) + + if err := rootCmd.Execute(); err != nil { + fmt.Println(err) + os.Exit(1) + } +} +func startEngineOrDie(cf *loader.ConfigLoader, interruptCh <-chan interface{}) { sc, err := cf.LoadServerConfig() if err != nil { @@ -27,8 +61,7 @@ func main() { } errCh := make(chan error) - interruptChan := cmdutils.InterruptChan() - ctx, cancel := cmdutils.InterruptContext(interruptChan) + ctx, cancel := cmdutils.InterruptContext(interruptCh) wg := sync.WaitGroup{} if sc.HasService("grpc") { @@ -170,7 +203,7 @@ Loop: os.Exit(1) break Loop - case <-interruptChan: + case <-interruptCh: break Loop } } diff --git a/frontend/app/src/components/molecules/brush-chart/brush-chart.tsx b/frontend/app/src/components/molecules/brush-chart/brush-chart.tsx index fb337b38c..4ce1d923f 100644 --- a/frontend/app/src/components/molecules/brush-chart/brush-chart.tsx +++ b/frontend/app/src/components/molecules/brush-chart/brush-chart.tsx @@ -1,5 +1,5 @@ /* eslint-disable @typescript-eslint/no-use-before-define */ -import React, { useRef, useState, useMemo } from "react"; +import { useRef, useState, useMemo } from "react"; import { scaleTime, scaleLinear } from "@visx/scale"; import appleStock, { AppleStock } from "@visx/mock-data/lib/mocks/appleStock"; import { Brush } from "@visx/brush"; @@ -10,7 +10,6 @@ import BaseBrush, { } from "@visx/brush/lib/BaseBrush"; import { PatternLines } from "@visx/pattern"; import { Group } from "@visx/group"; -import { LinearGradient } from "@visx/gradient"; import { max, extent } from "@visx/vendor/d3-array"; import { BrushHandleRenderProps } from "@visx/brush/lib/BrushHandle"; import AreaChart from "./area-chart"; @@ -21,7 +20,6 @@ const stock = appleStock.slice(1000); const brushMargin = { top: 10, bottom: 15, left: 50, right: 20 }; const chartSeparation = 30; const PATTERN_ID = "brush_pattern"; -const GRADIENT_ID = "brush_gradient"; export const accentColor = "#ffffff44"; export const background = "#1E293B"; export const background2 = "#8c77e0"; diff --git a/go.mod b/go.mod index e66bc8003..ed253a642 100644 --- a/go.mod +++ b/go.mod @@ -32,6 +32,7 @@ require ( github.com/golang-jwt/jwt v3.2.2+incompatible // indirect github.com/gorilla/mux v1.8.0 // indirect github.com/gorilla/websocket v1.5.0 // indirect + github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/invopop/yaml v0.2.0 // indirect github.com/jackc/pgpassfile v1.0.0 // indirect github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a // indirect @@ -43,6 +44,7 @@ require ( github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 // indirect github.com/perimeterx/marshmallow v1.1.5 // indirect github.com/rogpeppe/go-internal v1.10.0 // indirect + github.com/spf13/cobra v1.8.0 // indirect github.com/valyala/bytebufferpool v1.0.0 // indirect github.com/valyala/fasttemplate v1.2.2 // indirect golang.org/x/time v0.3.0 // indirect diff --git a/go.sum b/go.sum index 248d4de70..b2ed4e815 100644 --- a/go.sum +++ b/go.sum @@ -49,6 +49,7 @@ github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGX github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= +github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/creasty/defaults v1.7.0 h1:eNdqZvc5B509z18lD8yc212CAqJNvfT1Jq6L8WowdBA= github.com/creasty/defaults v1.7.0/go.mod h1:iGzKe6pbEHnpMPtfDXZEr0NVxWnPTjb1bbDy08fPzYM= @@ -185,6 +186,8 @@ github.com/iancoleman/strcase v0.2.0 h1:05I4QRnGpI0m37iZQRuskXh+w77mr6Z41lwQzuHL github.com/iancoleman/strcase v0.2.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= +github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= +github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/invopop/yaml v0.2.0 h1:7zky/qH+O0DwAyoobXUqvVBwgBFRxKoQ/3FjcVpjTMY= github.com/invopop/yaml v0.2.0/go.mod h1:2XuRLgs/ouIrW3XNzuNj7J3Nvu/Dig5MXvbCEdiBN3Q= github.com/jackc/pgpassfile v1.0.0 h1:/6Hmqy13Ss2zCq62VdNG8tM1wchn8zjSGOBJ6icpsIM= @@ -259,6 +262,7 @@ github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncj github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= github.com/rs/zerolog v1.31.0 h1:FcTR3NnLWW+NnTwwhFWiJSZr4ECLpqCm6QsEnyvbV4A= github.com/rs/zerolog v1.31.0/go.mod h1:/7mN4D5sKwJLZQ2b/znpjC3/GQWY/xaDXUM0kKWRHss= +github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/shopspring/decimal v1.3.1 h1:2Usl1nmF/WZucqkFZhnfFYxxxu8LG21F6nPQBE5gKV8= github.com/shopspring/decimal v1.3.1/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= github.com/slack-go/slack v0.12.3 h1:92/dfFU8Q5XP6Wp5rr5/T5JHLM5c5Smtn53fhToAP88= @@ -267,6 +271,8 @@ github.com/spf13/afero v1.10.0 h1:EaGW2JJh15aKOejeuJ+wpFSHnbd7GE6Wvp3TsNhb6LY= github.com/spf13/afero v1.10.0/go.mod h1:UBogFpq8E9Hx+xc5CNTTEpTnuHVmXDwZcZcE1eb/UhQ= github.com/spf13/cast v1.5.1 h1:R+kOtfhWQE6TVQzY+4D7wJLBgkdVasCEFxSUBYBYIlA= github.com/spf13/cast v1.5.1/go.mod h1:b9PdjNptOpzXr7Rq1q9gJML/2cdGQAo69NKzQ10KN48= +github.com/spf13/cobra v1.8.0 h1:7aJaZx1B85qltLMc546zn58BxxfZdR/W22ej9CFoEf0= +github.com/spf13/cobra v1.8.0/go.mod h1:WXLWApfZ71AjXPya3WOlMsY9yMs7YeiHhFVlvLyhcho= github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk= github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= diff --git a/hack/dev/proto.sh b/hack/proto/proto.sh similarity index 100% rename from hack/dev/proto.sh rename to hack/proto/proto.sh From 0f0c64cde4ca7f20eeca907ea5b77602d3225f13 Mon Sep 17 00:00:00 2001 From: Alexander Belanger Date: Tue, 19 Dec 2023 14:18:10 -0500 Subject: [PATCH 3/9] (temp) set to hardcoded tag --- .github/workflows/pre-release.yaml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/pre-release.yaml b/.github/workflows/pre-release.yaml index e72a5aa50..59b60954e 100644 --- a/.github/workflows/pre-release.yaml +++ b/.github/workflows/pre-release.yaml @@ -23,13 +23,13 @@ jobs: - name: Build run: | DOCKER_BUILDKIT=1 docker build -f ./build/package/servers.Dockerfile \ - -t ghcr.io/hatchet-dev/hatchet/hatchet-api:${{steps.tag_name.outputs.tag}} \ + -t ghcr.io/hatchet-dev/hatchet/hatchet-api:v0.1.0-alpha.0 \ --build-arg SERVER_TARGET=api \ - --build-arg VERSION=${{steps.tag_name.outputs.tag}} \ + --build-arg VERSION=v0.1.0-alpha.0 \ . - name: Push to GHCR run: | - docker push ghcr.io/hatchet-dev/hatchet/hatchet-api:${{steps.tag_name.outputs.tag}} + docker push ghcr.io/hatchet-dev/hatchet/hatchet-api:v0.1.0-alpha.0 build-push-hatchet-engine: name: Build and push a new hatchet-engine docker image runs-on: ubuntu-latest @@ -47,10 +47,10 @@ jobs: - name: Build run: | DOCKER_BUILDKIT=1 docker build -f ./build/package/servers.Dockerfile \ - -t ghcr.io/hatchet-dev/hatchet/hatchet-engine:${{steps.tag_name.outputs.tag}} \ + -t ghcr.io/hatchet-dev/hatchet/hatchet-engine:v0.1.0-alpha.0 \ --build-arg SERVER_TARGET=engine \ - --build-arg VERSION=${{steps.tag_name.outputs.tag}} \ + --build-arg VERSION=v0.1.0-alpha.0 \ . - name: Push to GHCR run: | - docker push ghcr.io/hatchet-dev/hatchet/hatchet-engine:${{steps.tag_name.outputs.tag}} + docker push ghcr.io/hatchet-dev/hatchet/hatchet-engine:v0.1.0-alpha.0 From 5bb47d57619fe7f934ffe28b099dfda16f4c9e84 Mon Sep 17 00:00:00 2001 From: Alexander Belanger Date: Tue, 19 Dec 2023 14:20:13 -0500 Subject: [PATCH 4/9] chore: add frontend build --- .github/workflows/pre-release.yaml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/.github/workflows/pre-release.yaml b/.github/workflows/pre-release.yaml index 59b60954e..104e07d07 100644 --- a/.github/workflows/pre-release.yaml +++ b/.github/workflows/pre-release.yaml @@ -54,3 +54,25 @@ jobs: - name: Push to GHCR run: | docker push ghcr.io/hatchet-dev/hatchet/hatchet-engine:v0.1.0-alpha.0 + build-push-hatchet-frontend: + name: Build and push a new hatchet-frontend docker image + runs-on: ubuntu-latest + steps: + - name: Get tag name + id: tag_name + run: echo "tag=${GITHUB_TAG/refs\/tags\//}" >> $GITHUB_OUTPUT + env: + GITHUB_TAG: ${{ github.ref }} + - name: Checkout + uses: actions/checkout@v3 + - name: Login to GHCR + id: login-ghcr + run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin + - name: Build + run: | + DOCKER_BUILDKIT=1 docker build -f ./build/package/frontend.Dockerfile \ + -t ghcr.io/hatchet-dev/hatchet/hatchet-frontend:v0.1.0-alpha.0 \ + . + - name: Push to GHCR + run: | + docker push ghcr.io/hatchet-dev/hatchet/hatchet-frontend:v0.1.0-alpha.0 From ba122358478eefe943a27fba3934df1c06448de9 Mon Sep 17 00:00:00 2001 From: Alexander Belanger Date: Tue, 19 Dec 2023 14:27:10 -0500 Subject: [PATCH 5/9] chore: update job names --- .github/workflows/pre-release.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pre-release.yaml b/.github/workflows/pre-release.yaml index 104e07d07..5fd35e8ad 100644 --- a/.github/workflows/pre-release.yaml +++ b/.github/workflows/pre-release.yaml @@ -7,7 +7,7 @@ on: name: Create prerelease w/ binaries and static assets jobs: build-push-hatchet-api: - name: Build and push a new hatchet-api docker image + name: hatchet-api runs-on: ubuntu-latest steps: - name: Get tag name @@ -31,7 +31,7 @@ jobs: run: | docker push ghcr.io/hatchet-dev/hatchet/hatchet-api:v0.1.0-alpha.0 build-push-hatchet-engine: - name: Build and push a new hatchet-engine docker image + name: hatchet-engine runs-on: ubuntu-latest steps: - name: Get tag name @@ -55,7 +55,7 @@ jobs: run: | docker push ghcr.io/hatchet-dev/hatchet/hatchet-engine:v0.1.0-alpha.0 build-push-hatchet-frontend: - name: Build and push a new hatchet-frontend docker image + name: hatchet-frontend runs-on: ubuntu-latest steps: - name: Get tag name From 4021fcab740b6e33a0a7ad0d1ec5cff51afeb6e7 Mon Sep 17 00:00:00 2001 From: Alexander Belanger Date: Tue, 19 Dec 2023 14:29:23 -0500 Subject: [PATCH 6/9] chore: wrap up docker builds --- .github/workflows/pre-release.yaml | 18 +++++++--------- .github/workflows/release.yaml | 34 ++++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+), 10 deletions(-) create mode 100644 .github/workflows/release.yaml diff --git a/.github/workflows/pre-release.yaml b/.github/workflows/pre-release.yaml index 5fd35e8ad..6220f35de 100644 --- a/.github/workflows/pre-release.yaml +++ b/.github/workflows/pre-release.yaml @@ -2,8 +2,6 @@ on: push: tags: - "v*" # Push events to matching v*, i.e. v1.0, v20.15.10 - branches: - - belanger/docker-builds name: Create prerelease w/ binaries and static assets jobs: build-push-hatchet-api: @@ -23,13 +21,13 @@ jobs: - name: Build run: | DOCKER_BUILDKIT=1 docker build -f ./build/package/servers.Dockerfile \ - -t ghcr.io/hatchet-dev/hatchet/hatchet-api:v0.1.0-alpha.0 \ + -t ghcr.io/hatchet-dev/hatchet/hatchet-api:${{steps.tag_name.outputs.tag}} \ --build-arg SERVER_TARGET=api \ - --build-arg VERSION=v0.1.0-alpha.0 \ + --build-arg VERSION=${{steps.tag_name.outputs.tag}} \ . - name: Push to GHCR run: | - docker push ghcr.io/hatchet-dev/hatchet/hatchet-api:v0.1.0-alpha.0 + docker push ghcr.io/hatchet-dev/hatchet/hatchet-api:${{steps.tag_name.outputs.tag}} build-push-hatchet-engine: name: hatchet-engine runs-on: ubuntu-latest @@ -47,13 +45,13 @@ jobs: - name: Build run: | DOCKER_BUILDKIT=1 docker build -f ./build/package/servers.Dockerfile \ - -t ghcr.io/hatchet-dev/hatchet/hatchet-engine:v0.1.0-alpha.0 \ + -t ghcr.io/hatchet-dev/hatchet/hatchet-engine:${{steps.tag_name.outputs.tag}} \ --build-arg SERVER_TARGET=engine \ - --build-arg VERSION=v0.1.0-alpha.0 \ + --build-arg VERSION=${{steps.tag_name.outputs.tag}} \ . - name: Push to GHCR run: | - docker push ghcr.io/hatchet-dev/hatchet/hatchet-engine:v0.1.0-alpha.0 + docker push ghcr.io/hatchet-dev/hatchet/hatchet-engine:${{steps.tag_name.outputs.tag}} build-push-hatchet-frontend: name: hatchet-frontend runs-on: ubuntu-latest @@ -71,8 +69,8 @@ jobs: - name: Build run: | DOCKER_BUILDKIT=1 docker build -f ./build/package/frontend.Dockerfile \ - -t ghcr.io/hatchet-dev/hatchet/hatchet-frontend:v0.1.0-alpha.0 \ + -t ghcr.io/hatchet-dev/hatchet/hatchet-frontend:${{steps.tag_name.outputs.tag}} \ . - name: Push to GHCR run: | - docker push ghcr.io/hatchet-dev/hatchet/hatchet-frontend:v0.1.0-alpha.0 + docker push ghcr.io/hatchet-dev/hatchet/hatchet-frontend:${{steps.tag_name.outputs.tag}} diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 000000000..710047b09 --- /dev/null +++ b/.github/workflows/release.yaml @@ -0,0 +1,34 @@ +on: + release: + types: [released] +name: Release +jobs: + push-hatchet-server: + name: Push latest + runs-on: ubuntu-latest + steps: + - name: Get tag name + id: tag_name + run: | + tag=${GITHUB_TAG/refs\/tags\//} + echo ::set-output name=tag::$tag + env: + GITHUB_TAG: ${{ github.ref }} + - name: Login to GHCR + id: login-ghcr + run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin + - name: Pull and push hatchet-api + run: | + docker pull ghcr.io/hatchet-dev/hatchet/hatchet-api:${{steps.tag_name.outputs.tag}} + docker tag ghcr.io/hatchet-dev/hatchet/hatchet-api:${{steps.tag_name.outputs.tag}} ghcr.io/hatchet-dev/hatchet/hatchet-server:latest + docker push ghcr.io/hatchet-dev/hatchet/hatchet-api:latest + - name: Pull and push hatchet-engine + run: | + docker pull ghcr.io/hatchet-dev/hatchet/hatchet-engine:${{steps.tag_name.outputs.tag}} + docker tag ghcr.io/hatchet-dev/hatchet/hatchet-engine:${{steps.tag_name.outputs.tag}} ghcr.io/hatchet-dev/hatchet/hatchet-engine:latest + docker push ghcr.io/hatchet-dev/hatchet/hatchet-engine:latest + - name: Pull and push hatchet-frontend + run: | + docker pull ghcr.io/hatchet-dev/hatchet/hatchet-frontend:${{steps.tag_name.outputs.tag}} + docker tag ghcr.io/hatchet-dev/hatchet/hatchet-frontend:${{steps.tag_name.outputs.tag}} ghcr.io/hatchet-dev/hatchet/hatchet-frontend:latest + docker push ghcr.io/hatchet-dev/hatchet/hatchet-frontend:latest From 719b71ce00d2d0d80d5ecd8c3ab5f0488163f10a Mon Sep 17 00:00:00 2001 From: Alexander Belanger Date: Tue, 19 Dec 2023 14:30:51 -0500 Subject: [PATCH 7/9] remove engine dockerfile --- build/package/engine.Dockerfile | 66 --------------------------------- 1 file changed, 66 deletions(-) delete mode 100644 build/package/engine.Dockerfile diff --git a/build/package/engine.Dockerfile b/build/package/engine.Dockerfile deleted file mode 100644 index 97e9cf175..000000000 --- a/build/package/engine.Dockerfile +++ /dev/null @@ -1,66 +0,0 @@ -# Base Go environment -# ------------------- -FROM golang:1.21-alpine as base -WORKDIR /hatchet - -RUN apk update && apk add --no-cache gcc musl-dev git protoc protobuf-dev - -COPY go.mod go.sum ./ -COPY /api-contracts ./api-contracts -COPY /internal ./internal -COPY /pkg ./pkg -COPY /hack ./hack -COPY /prisma ./prisma -COPY /cmd ./cmd - -RUN go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.28 -RUN go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.2 -RUN go install github.com/deepmap/oapi-codegen/v2/cmd/oapi-codegen@latest - -RUN --mount=type=cache,target=$GOPATH/pkg/mod \ - go mod download - -# prefetch the binaries, so that they will be cached and not downloaded on each change -RUN go run github.com/steebchen/prisma-client-go prefetch - -# generate the Prisma Client Go client -RUN go run github.com/steebchen/prisma-client-go generate --generator go - -# OpenAPI bundle environment -# ------------------------- -FROM node:16-alpine as build-openapi -WORKDIR /openapi - -COPY /api-contracts/openapi ./openapi - -RUN npm install -g npm@8.1 - -RUN npm install -g @apidevtools/swagger-cli prisma - -RUN swagger-cli bundle ./openapi/openapi.yaml --outfile ./bin/oas/openapi.yaml --type yaml - -# Go build environment -# -------------------- -FROM base AS build-go - -RUN sh ./hack/proto/proto.sh - -COPY --from=build-openapi /openapi/bin/oas/openapi.yaml ./bin/oas/openapi.yaml - -# build oapi -RUN oapi-codegen -config ./api/v1/server/oas/gen/codegen.yaml ./bin/oas/openapi.yaml - -RUN --mount=type=cache,target=/root/.cache/go-build \ - --mount=type=cache,target=$GOPATH/pkg/mod \ - go build -ldflags="-w -s" -a -o ./bin/hatchet-engine ./cmd/hatchet-engine - -# Deployment environment -# ---------------------- -FROM alpine AS deployment - -RUN apk update && apk add --no-cache gcc musl-dev - -COPY --from=build-go /hatchet/bin/hatchet-engine /hatchet/ - -EXPOSE 8080 -CMD /hatchet/hatchet-engine From b6dedd6131aec481f7bbbb8056f1cb8aea1e2e88 Mon Sep 17 00:00:00 2001 From: Alexander Belanger Date: Tue, 19 Dec 2023 14:37:29 -0500 Subject: [PATCH 8/9] add migrate dockerfile --- .github/workflows/pre-release.yaml | 22 ++++++++++ build/package/migrate.Dockerfile | 16 +++++++ build/package/server.Dockerfile | 67 ------------------------------ 3 files changed, 38 insertions(+), 67 deletions(-) create mode 100644 build/package/migrate.Dockerfile delete mode 100644 build/package/server.Dockerfile diff --git a/.github/workflows/pre-release.yaml b/.github/workflows/pre-release.yaml index 6220f35de..7c8832afe 100644 --- a/.github/workflows/pre-release.yaml +++ b/.github/workflows/pre-release.yaml @@ -52,6 +52,28 @@ jobs: - name: Push to GHCR run: | docker push ghcr.io/hatchet-dev/hatchet/hatchet-engine:${{steps.tag_name.outputs.tag}} + build-push-hatchet-migrate: + name: hatchet-migrate + runs-on: ubuntu-latest + steps: + - name: Get tag name + id: tag_name + run: echo "tag=${GITHUB_TAG/refs\/tags\//}" >> $GITHUB_OUTPUT + env: + GITHUB_TAG: ${{ github.ref }} + - name: Checkout + uses: actions/checkout@v3 + - name: Login to GHCR + id: login-ghcr + run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin + - name: Build + run: | + DOCKER_BUILDKIT=1 docker build -f ./build/package/migrate.Dockerfile \ + -t ghcr.io/hatchet-dev/hatchet/hatchet-migrate:${{steps.tag_name.outputs.tag}} \ + . + - name: Push to GHCR + run: | + docker push ghcr.io/hatchet-dev/hatchet/hatchet-migrate:${{steps.tag_name.outputs.tag}} build-push-hatchet-frontend: name: hatchet-frontend runs-on: ubuntu-latest diff --git a/build/package/migrate.Dockerfile b/build/package/migrate.Dockerfile new file mode 100644 index 000000000..183de9746 --- /dev/null +++ b/build/package/migrate.Dockerfile @@ -0,0 +1,16 @@ +# Base Go environment +# ------------------- +FROM golang:1.21-alpine as base +WORKDIR /hatchet + +RUN apk update && apk add --no-cache gcc musl-dev git + +COPY go.mod go.sum ./ +COPY /prisma ./prisma + +RUN go install github.com/steebchen/prisma-client-go@v0.31.2 + +# prefetch the binaries, so that they will be cached and not downloaded on each change +RUN go run github.com/steebchen/prisma-client-go prefetch + +CMD go run github.com/steebchen/prisma-client-go migrate deploy \ No newline at end of file diff --git a/build/package/server.Dockerfile b/build/package/server.Dockerfile deleted file mode 100644 index 6a5ad52ae..000000000 --- a/build/package/server.Dockerfile +++ /dev/null @@ -1,67 +0,0 @@ -# Base Go environment -# ------------------- -FROM golang:1.21-alpine as base -WORKDIR /hatchet - -RUN apk update && apk add --no-cache gcc musl-dev git protoc protobuf-dev - -COPY go.mod go.sum ./ -COPY /api ./api -COPY /api-contracts ./api-contracts -COPY /internal ./internal -COPY /pkg ./pkg -COPY /hack ./hack -COPY /prisma ./prisma -COPY /cmd ./cmd - -RUN go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.28 -RUN go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.2 -RUN go install github.com/deepmap/oapi-codegen/v2/cmd/oapi-codegen@latest - -RUN --mount=type=cache,target=$GOPATH/pkg/mod \ - go mod download - -# prefetch the binaries, so that they will be cached and not downloaded on each change -RUN go run github.com/steebchen/prisma-client-go prefetch - -# generate the Prisma Client Go client -RUN go run github.com/steebchen/prisma-client-go generate --generator go - -# OpenAPI bundle environment -# ------------------------- -FROM node:16-alpine as build-openapi -WORKDIR /openapi - -COPY /api-contracts/openapi ./openapi - -RUN npm install -g npm@8.1 - -RUN npm install -g @apidevtools/swagger-cli prisma - -RUN swagger-cli bundle ./openapi/openapi.yaml --outfile ./bin/oas/openapi.yaml --type yaml - -# Go build environment -# -------------------- -FROM base AS build-go - -RUN sh ./hack/proto/proto.sh - -COPY --from=build-openapi /openapi/bin/oas/openapi.yaml ./bin/oas/openapi.yaml - -# build oapi -RUN oapi-codegen -config ./api/v1/server/oas/gen/codegen.yaml ./bin/oas/openapi.yaml - -RUN --mount=type=cache,target=/root/.cache/go-build \ - --mount=type=cache,target=$GOPATH/pkg/mod \ - go build -ldflags="-w -s" -a -o ./bin/hatchet-api ./cmd/hatchet-api - -# Deployment environment -# ---------------------- -FROM alpine AS deployment - -RUN apk update && apk add --no-cache gcc musl-dev - -COPY --from=build-go /hatchet/bin/hatchet-api /hatchet/ - -EXPOSE 8080 -CMD /hatchet/hatchet-api From b291067303c28af9fc4a0f7cd14fab7d66ba60e0 Mon Sep 17 00:00:00 2001 From: Alexander Belanger Date: Tue, 19 Dec 2023 14:38:12 -0500 Subject: [PATCH 9/9] add hatchet-migrate to release file --- .github/workflows/release.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 710047b09..ce91dcabc 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -32,3 +32,8 @@ jobs: docker pull ghcr.io/hatchet-dev/hatchet/hatchet-frontend:${{steps.tag_name.outputs.tag}} docker tag ghcr.io/hatchet-dev/hatchet/hatchet-frontend:${{steps.tag_name.outputs.tag}} ghcr.io/hatchet-dev/hatchet/hatchet-frontend:latest docker push ghcr.io/hatchet-dev/hatchet/hatchet-frontend:latest + - name: Pull and push hatchet-migrate + run: | + docker pull ghcr.io/hatchet-dev/hatchet/hatchet-migrate:${{steps.tag_name.outputs.tag}} + docker tag ghcr.io/hatchet-dev/hatchet/hatchet-migrate:${{steps.tag_name.outputs.tag}} ghcr.io/hatchet-dev/hatchet/hatchet-migrate:latest + docker push ghcr.io/hatchet-dev/hatchet/hatchet-migrate:latest