From 031ae205da155a5b294c2706506c6a7c8fcac537 Mon Sep 17 00:00:00 2001 From: Hayden Hargreaves Date: Mon, 21 Jul 2025 20:30:42 -0700 Subject: [PATCH 1/6] (FIX): Added tidy to the Dockerfile. Should work in actions --- Dockerfile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index a018fdb..8fae995 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,10 +3,13 @@ FROM golang:latest AS fetch-stage COPY go.mod go.sum /app +COPY . /app + WORKDIR /app -RUN go mod download +RUN go mod tidy +RUN go mod download # Generate stage FROM ghcr.io/a-h/templ:latest AS generate-stage From be0b580c1986c7c085839dad2e4b93a59851e19a Mon Sep 17 00:00:00 2001 From: Hayden Hargreaves Date: Mon, 21 Jul 2025 20:31:50 -0700 Subject: [PATCH 2/6] (FIX/TMP): Running actions in dev branch, temp. --- .github/workflows/deploy.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index d10ed84..bb571da 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -4,6 +4,7 @@ on: push: branches: - master + - dev jobs: build_and_deploy: From 6f58b573721b0296adc1589b24608dd698665017 Mon Sep 17 00:00:00 2001 From: Hayden Hargreaves Date: Mon, 21 Jul 2025 20:40:50 -0700 Subject: [PATCH 3/6] (FIX): Trying again --- Dockerfile | 3 --- go.mod | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 8fae995..1f0b0e2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,14 +1,11 @@ # Fetch stage FROM golang:latest AS fetch-stage -COPY go.mod go.sum /app - COPY . /app WORKDIR /app RUN go mod tidy - RUN go mod download # Generate stage diff --git a/go.mod b/go.mod index 2a7b6ff..31e6e1b 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/haydenhargreaves/Potion go 1.24.3 require ( - github.com/a-h/templ v0.3.898 + github.com/a-h/templ v0.3.920 github.com/a-h/templ/examples/integration-gin v0.0.0-20250610141150-9b34663a6ef0 github.com/gin-contrib/cors v1.7.5 github.com/gin-gonic/gin v1.10.1 From fd3c63c1cbc5799c257c8dc0f91dbfd2d7cb4892 Mon Sep 17 00:00:00 2001 From: Hayden Hargreaves Date: Mon, 21 Jul 2025 20:44:45 -0700 Subject: [PATCH 4/6] Adding tidy and download later? Maybe I need to add go.sum to repo? --- Dockerfile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Dockerfile b/Dockerfile index 1f0b0e2..17da7fd 100644 --- a/Dockerfile +++ b/Dockerfile @@ -35,6 +35,9 @@ COPY --from=tailwind-build-stage /app /app WORKDIR /app +RUN go mod tidy +RUN go mod download + RUN CGO_ENABLED=0 GOOS=linux go build -o /entrypoint /app/cmd/web/main.go # Deploy. From fad39c2e217e9e6868cf032d566ff2080995dd59 Mon Sep 17 00:00:00 2001 From: Hayden Hargreaves Date: Mon, 21 Jul 2025 20:46:31 -0700 Subject: [PATCH 5/6] (FIX): Its working! But spelling error... --- .github/workflows/deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index bb571da..c04cfe6 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -26,4 +26,4 @@ jobs: context: . file: ./Dockerfile push: true - tags: azpect3120/option.gophernest:latest + tags: azpect3120/potion.gophernest:latest From 0849a46b78b3161ed0da7905b18b07fa5f0996c2 Mon Sep 17 00:00:00 2001 From: Hayden Hargreaves Date: Mon, 21 Jul 2025 21:32:01 -0700 Subject: [PATCH 6/6] (FIX): Only running in master, not dev --- .github/workflows/deploy.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index c04cfe6..72ef0ee 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -4,7 +4,6 @@ on: push: branches: - master - - dev jobs: build_and_deploy: