From 8de828470b5e2bbe799bb5c700e8d11326df000d Mon Sep 17 00:00:00 2001 From: Gabriel Rodriguez Date: Fri, 16 Jan 2026 15:35:53 +0100 Subject: [PATCH 01/23] Update to README --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index c2bec0368b7..e2d0ed6214f 100644 --- a/README.md +++ b/README.md @@ -21,3 +21,5 @@ go build -o notely && ./notely *This starts the server in non-database mode.* It will serve a simple webpage at `http://localhost:8080`. You do *not* need to set up a database or any interactivity on the webpage yet. Instructions for that will come later in the course! + +Gabriel's version of Boot.dev's Notely app. From 6f3a4c489c622ccbc9264f897ecfa96d074d4a75 Mon Sep 17 00:00:00 2001 From: Gabriel Rodriguez Date: Fri, 16 Jan 2026 15:46:57 +0100 Subject: [PATCH 02/23] Add basic CI .yml file --- .github/workflows/ci.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000000..249cc5258a3 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,22 @@ +name: ci + +on: + pull_request: + branches: [main] + +jobs: + tests: + name: Tests + runs-on: ubuntu-latest + + steps: + - name: Check out code + uses: actions/checkout@v4 + + - name: Set up Go + uses: actions/setup-go@v5 + with: + go-version: "1.25.1" + + - name: Force Failure + run: (exit 1) From 37ec7a2e009b4e8e3914e8ef691d269c2e010e14 Mon Sep 17 00:00:00 2001 From: Gabriel Rodriguez Date: Fri, 16 Jan 2026 15:52:35 +0100 Subject: [PATCH 03/23] Update failing test to -go version- --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 249cc5258a3..19fc78d18fc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,5 +18,5 @@ jobs: with: go-version: "1.25.1" - - name: Force Failure - run: (exit 1) + - name: Go version + run: (go version) From 39f06a969aa98ca9a4c0f7547c2fb4c4053998e8 Mon Sep 17 00:00:00 2001 From: Gabriel Rodriguez Date: Fri, 16 Jan 2026 16:21:20 +0100 Subject: [PATCH 04/23] Add tests for auth.go and include them in the ci.yml file. --- .github/workflows/ci.yml | 4 +-- internal/auth/auth_test.go | 62 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 64 insertions(+), 2 deletions(-) create mode 100644 internal/auth/auth_test.go diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 19fc78d18fc..d15657eaeae 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,5 +18,5 @@ jobs: with: go-version: "1.25.1" - - name: Go version - run: (go version) + - name: Run Go tests + run: go test ./... diff --git a/internal/auth/auth_test.go b/internal/auth/auth_test.go new file mode 100644 index 00000000000..5a4daf1ed9f --- /dev/null +++ b/internal/auth/auth_test.go @@ -0,0 +1,62 @@ +package auth + +import ( + "net/http" + "testing" +) + +func TestGetAPIKey_ValidHeader(t *testing.T) { + h := http.Header{} + h.Set("Authorization", "ApiKey abc123") + + key, err := GetAPIKey(h) + if err != nil { + t.Fatalf("expected no error, got %v", err) + } + if key != "abc123" { + t.Fatalf("expected key %q, got %q", "abc123", key) + } +} + +func TestGetAPIKey_MissingHeader(t *testing.T) { + h := http.Header{} + + _, err := GetAPIKey(h) + if err != ErrNoAuthHeaderIncluded { + t.Fatalf("expected ErrNoAuthHeaderIncluded, got %v", err) + } +} + +func TestGetAPIKey_WrongScheme(t *testing.T) { + h := http.Header{} + h.Set("Authorization", "Bearer abc123") + + _, err := GetAPIKey(h) + if err == nil { + t.Fatal("expected error, got nil") + } +} + +func TestGetAPIKey_MalformedHeader(t *testing.T) { + h := http.Header{} + h.Set("Authorization", "ApiKey") + + _, err := GetAPIKey(h) + if err == nil { + t.Fatal("expected error, got nil") + } +} + +func TestGetAPIKey_ExtraSpaces(t *testing.T) { + h := http.Header{} + h.Set("Authorization", "ApiKey abc123") + + key, err := GetAPIKey(h) + if err != nil { + t.Fatalf("expected no error, got %v", err) + } + if key != "abc123" { + t.Fatalf("expected key %q, got %q", "abc123", key) + } +} + From 574fe1f59e98e6c036066640141b8b978f0cf999 Mon Sep 17 00:00:00 2001 From: Gabriel Rodriguez Date: Fri, 16 Jan 2026 16:25:20 +0100 Subject: [PATCH 05/23] Remove test designed to fail --- internal/auth/auth_test.go | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/internal/auth/auth_test.go b/internal/auth/auth_test.go index 5a4daf1ed9f..806d3241a5d 100644 --- a/internal/auth/auth_test.go +++ b/internal/auth/auth_test.go @@ -47,16 +47,3 @@ func TestGetAPIKey_MalformedHeader(t *testing.T) { } } -func TestGetAPIKey_ExtraSpaces(t *testing.T) { - h := http.Header{} - h.Set("Authorization", "ApiKey abc123") - - key, err := GetAPIKey(h) - if err != nil { - t.Fatalf("expected no error, got %v", err) - } - if key != "abc123" { - t.Fatalf("expected key %q, got %q", "abc123", key) - } -} - From c4007c14bf06afa818839e441bc191414e594782 Mon Sep 17 00:00:00 2001 From: Gabriel Rodriguez Date: Fri, 16 Jan 2026 16:42:32 +0100 Subject: [PATCH 06/23] Update go tests with -cover flag --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d15657eaeae..5081e376a66 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,4 +19,4 @@ jobs: go-version: "1.25.1" - name: Run Go tests - run: go test ./... + run: go test -cover ./... From 766958733f48fd0d4ec7b2af46d07045e261b808 Mon Sep 17 00:00:00 2001 From: Gabriel Rodriguez Date: Fri, 16 Jan 2026 16:55:07 +0100 Subject: [PATCH 07/23] Add badge to README --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index e2d0ed6214f..666a5a63e3c 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ +![](https://github.com/gabyrod7/learn-cicd-starter/actions/workflows/ci.yml/badge.svg) + # learn-cicd-starter (Notely) This repo contains the starter code for the "Notely" application for the "Learn CICD" course on [Boot.dev](https://boot.dev). From ed1df936175fc5ee69ae316ab13133ff070be8e8 Mon Sep 17 00:00:00 2001 From: Gabriel Rodriguez Date: Sat, 17 Jan 2026 21:14:51 +0100 Subject: [PATCH 08/23] Add style formatting job to CI --- .github/workflows/ci.yml | 12 ++++++++++++ internal/auth/auth_test.go | 1 - 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5081e376a66..41ecac7c2d1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -20,3 +20,15 @@ jobs: - name: Run Go tests run: go test -cover ./... + + style: + - name: Check out code + uses: actions/checkout@v4 + + - name: Set up Go + uses: actions/setup-go@v5 + with: + go-version: "1.25.1" + + - name: Format Go code + run: test -z $(go fmt ./...) diff --git a/internal/auth/auth_test.go b/internal/auth/auth_test.go index 806d3241a5d..b14b13a6fc3 100644 --- a/internal/auth/auth_test.go +++ b/internal/auth/auth_test.go @@ -46,4 +46,3 @@ func TestGetAPIKey_MalformedHeader(t *testing.T) { t.Fatal("expected error, got nil") } } - From 96d4e22acdcf1db39bdf771fd70dcfea6b3b4acd Mon Sep 17 00:00:00 2001 From: Gabriel Rodriguez Date: Sat, 17 Jan 2026 21:25:00 +0100 Subject: [PATCH 09/23] Fix ci.yml file. Was missing some important lines --- .github/workflows/ci.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 41ecac7c2d1..e81d94a0f40 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,6 +22,10 @@ jobs: run: go test -cover ./... style: + name: Style + runs-on: ubuntu-latest + + steps: - name: Check out code uses: actions/checkout@v4 From 27fce3c90632b05fa8ac65c6837fa76ae895f202 Mon Sep 17 00:00:00 2001 From: Gabriel Rodriguez Date: Sat, 17 Jan 2026 22:31:31 +0100 Subject: [PATCH 10/23] Add linting with staticcheck to CI pipeline and a failing main.go file. --- .github/workflows/ci.yml | 6 ++++++ main.go | 5 +++++ 2 files changed, 11 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e81d94a0f40..a1ec22fca7a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -36,3 +36,9 @@ jobs: - name: Format Go code run: test -z $(go fmt ./...) + + - name: Install staticcheck + run: go install honnef.co/go/tools/cmd/staticcheck@latest + + - name: Run staticcheck + run: staticcheck ./... diff --git a/main.go b/main.go index 19d7366c5f7..8f575c811fb 100644 --- a/main.go +++ b/main.go @@ -24,6 +24,11 @@ type apiConfig struct { //go:embed static/* var staticFiles embed.FS +func unused() { + // this function does nothing + // and is called nowhere +} + func main() { err := godotenv.Load(".env") if err != nil { From 58de0bd3240ee8db83c1674cb27224263f3d8e48 Mon Sep 17 00:00:00 2001 From: Gabriel Rodriguez Date: Sat, 17 Jan 2026 22:36:29 +0100 Subject: [PATCH 11/23] main.go failed format test... no the fail I was looking for --- main.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.go b/main.go index 8f575c811fb..56c493934dc 100644 --- a/main.go +++ b/main.go @@ -25,8 +25,8 @@ type apiConfig struct { var staticFiles embed.FS func unused() { - // this function does nothing - // and is called nowhere + // this function does nothing + // and is called nowhere } func main() { From b8706e55e86b44e37fb6380e74c2f28daac45875 Mon Sep 17 00:00:00 2001 From: Gabriel Rodriguez Date: Sat, 17 Jan 2026 22:38:19 +0100 Subject: [PATCH 12/23] remove unnecessary code in main.go so that the test passes --- main.go | 5 ----- 1 file changed, 5 deletions(-) diff --git a/main.go b/main.go index 56c493934dc..19d7366c5f7 100644 --- a/main.go +++ b/main.go @@ -24,11 +24,6 @@ type apiConfig struct { //go:embed static/* var staticFiles embed.FS -func unused() { - // this function does nothing - // and is called nowhere -} - func main() { err := godotenv.Load(".env") if err != nil { From c5f18380e2afd3f5a48d55258ced355e31fd6e50 Mon Sep 17 00:00:00 2001 From: Gabriel Rodriguez Date: Sat, 17 Jan 2026 22:46:01 +0100 Subject: [PATCH 13/23] Add a security check with gosec --- .github/workflows/ci.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a1ec22fca7a..eedf25276fc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,6 +21,12 @@ jobs: - name: Run Go tests run: go test -cover ./... + - name: Install gosec + run: go install github.com/securego/gosec/v2/cmd/gosec@latest + + - name: Run gosec + run: gosec ./... + style: name: Style runs-on: ubuntu-latest From c6cf76f9083a95cc442fa8c1251d567bb9daa938 Mon Sep 17 00:00:00 2001 From: Gabriel Rodriguez Date: Sat, 17 Jan 2026 22:53:20 +0100 Subject: [PATCH 14/23] Fix security issues identified by gosec --- json.go | 6 +++++- main.go | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/json.go b/json.go index 1e6e7985e18..403da0a0030 100644 --- a/json.go +++ b/json.go @@ -30,5 +30,9 @@ func respondWithJSON(w http.ResponseWriter, code int, payload interface{}) { return } w.WriteHeader(code) - w.Write(dat) + if _, err := w.Write(dat); err != nil { + // At this point headers are already sent, so we can only log. + log.Printf("failed to write response: %v", err) + } + } diff --git a/main.go b/main.go index 19d7366c5f7..34107485f1c 100644 --- a/main.go +++ b/main.go @@ -91,6 +91,7 @@ func main() { srv := &http.Server{ Addr: ":" + port, Handler: router, + ReadHeaderTimeout: 5_000_000_000, // nanoseconds } log.Printf("Serving on port: %s\n", port) From 7c55c59b04d958c8a49e6273cba557b0735028c1 Mon Sep 17 00:00:00 2001 From: Gabriel Rodriguez Date: Sat, 17 Jan 2026 22:58:45 +0100 Subject: [PATCH 15/23] Fix formatting issues in main.go and json.go --- json.go | 8 ++++---- main.go | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/json.go b/json.go index 403da0a0030..9825dee3720 100644 --- a/json.go +++ b/json.go @@ -30,9 +30,9 @@ func respondWithJSON(w http.ResponseWriter, code int, payload interface{}) { return } w.WriteHeader(code) - if _, err := w.Write(dat); err != nil { - // At this point headers are already sent, so we can only log. - log.Printf("failed to write response: %v", err) - } + if _, err := w.Write(dat); err != nil { + // At this point headers are already sent, so we can only log. + log.Printf("failed to write response: %v", err) + } } diff --git a/main.go b/main.go index 34107485f1c..0a4a9eb7a48 100644 --- a/main.go +++ b/main.go @@ -89,9 +89,9 @@ func main() { router.Mount("/v1", v1Router) srv := &http.Server{ - Addr: ":" + port, - Handler: router, - ReadHeaderTimeout: 5_000_000_000, // nanoseconds + Addr: ":" + port, + Handler: router, + ReadHeaderTimeout: 5_000_000_000, // nanoseconds } log.Printf("Serving on port: %s\n", port) From 026f66e9ab03e164b6b9691b09245a40fe2e48bd Mon Sep 17 00:00:00 2001 From: Gabriel Rodriguez Date: Sat, 17 Jan 2026 23:17:25 +0100 Subject: [PATCH 16/23] Add CD pipeline --- .github/workflows/cd.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 .github/workflows/cd.yml diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml new file mode 100644 index 00000000000..f8a16bf8250 --- /dev/null +++ b/.github/workflows/cd.yml @@ -0,0 +1,22 @@ +name: cd + +on: + push: + branches: [main] + +jobs: + Deploy: + name: Deply + runs-on: ubuntu-latest + + steps: + - name: Check out code + uses: actions/checkout@v4 + + - name: Set up Go + uses: actions/setup-go@v5 + with: + go-version: "1.25.1" + + - name: Run build script + run: ./scripts/buildprod.sh From 20d329914490e13fbe3d1df25c3e5bcd8d235ab6 Mon Sep 17 00:00:00 2001 From: Gabriel Rodriguez Date: Sat, 17 Jan 2026 23:22:29 +0100 Subject: [PATCH 17/23] Fixed typo in cd.yml --- .github/workflows/cd.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index f8a16bf8250..c9fd2241b95 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -6,7 +6,7 @@ on: jobs: Deploy: - name: Deply + name: Deploy runs-on: ubuntu-latest steps: From 74a3a18ca224216dd654b203a829138e5103d724 Mon Sep 17 00:00:00 2001 From: Gabriel Rodriguez Date: Sun, 18 Jan 2026 16:18:11 +0100 Subject: [PATCH 18/23] Add a gcloud build and submit step to CD pipeline --- .github/workflows/cd.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index c9fd2241b95..58b3078017f 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -20,3 +20,14 @@ jobs: - name: Run build script run: ./scripts/buildprod.sh + + - id: 'auth' + uses: 'google-github-actions/auth@v2' + with: + credentials_json: '${{ secrets.GCP_CREDENTIALS }}' + + - name: 'Set up Cloud SDK' + uses: 'google-github-actions/setup-gcloud@v3' + + - name: 'Use gcloud CLI' + run: 'gcloud builds submit --tag europe-west6-docker.pkg.dev/notely-484713/notely-ar-repo' From 20527e80c035d4cc6efad992d023687b2c115ccf Mon Sep 17 00:00:00 2001 From: Gabriel Rodriguez Date: Sun, 18 Jan 2026 16:25:11 +0100 Subject: [PATCH 19/23] Fix indentation in cd.yml --- .github/workflows/cd.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 58b3078017f..3d82a7b8299 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -21,13 +21,13 @@ jobs: - name: Run build script run: ./scripts/buildprod.sh - - id: 'auth' - uses: 'google-github-actions/auth@v2' - with: - credentials_json: '${{ secrets.GCP_CREDENTIALS }}' - - - name: 'Set up Cloud SDK' - uses: 'google-github-actions/setup-gcloud@v3' - - - name: 'Use gcloud CLI' - run: 'gcloud builds submit --tag europe-west6-docker.pkg.dev/notely-484713/notely-ar-repo' + - id: 'auth' + uses: 'google-github-actions/auth@v2' + with: + credentials_json: '${{ secrets.GCP_CREDENTIALS }}' + + - name: 'Set up Cloud SDK' + uses: 'google-github-actions/setup-gcloud@v3' + + - name: 'Use gcloud CLI' + run: 'gcloud builds submit --tag europe-west6-docker.pkg.dev/notely-484713/notely-ar-repo' From 2bf2fc031fc66adc12992a53b4c3f7ba87b07d55 Mon Sep 17 00:00:00 2001 From: Gabriel Rodriguez Date: Sun, 18 Jan 2026 16:32:48 +0100 Subject: [PATCH 20/23] . --- .github/workflows/cd.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 3d82a7b8299..ece86bb91ef 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -31,3 +31,4 @@ jobs: - name: 'Use gcloud CLI' run: 'gcloud builds submit --tag europe-west6-docker.pkg.dev/notely-484713/notely-ar-repo' + From f0d1230b472a67d26316b85c8b886fa61fc7eb56 Mon Sep 17 00:00:00 2001 From: Gabriel Rodriguez Date: Sun, 18 Jan 2026 17:32:20 +0100 Subject: [PATCH 21/23] Fix gcloud command in cd.yml --- .github/workflows/cd.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index ece86bb91ef..d11d59431d2 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -30,5 +30,5 @@ jobs: uses: 'google-github-actions/setup-gcloud@v3' - name: 'Use gcloud CLI' - run: 'gcloud builds submit --tag europe-west6-docker.pkg.dev/notely-484713/notely-ar-repo' + run: 'gcloud builds submit --tag europe-west6-docker.pkg.dev/notely-484713/notely-ar-repo/notely:latest .' From f7a2502fc656b4c51fbe132cd7dd221e6cf31ee4 Mon Sep 17 00:00:00 2001 From: Gabriel Rodriguez Date: Sun, 18 Jan 2026 22:59:33 +0100 Subject: [PATCH 22/23] Add deploy to Cloud Run step to CD pipeline --- .github/workflows/cd.yml | 17 ++++++++++------- static/index.html | 2 +- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index d11d59431d2..48a5eea5a69 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -21,14 +21,17 @@ jobs: - name: Run build script run: ./scripts/buildprod.sh - - id: 'auth' - uses: 'google-github-actions/auth@v2' + - id: auth + uses: google-github-actions/auth@v2 with: - credentials_json: '${{ secrets.GCP_CREDENTIALS }}' + credentials_json: ${{ secrets.GCP_CREDENTIALS }} - - name: 'Set up Cloud SDK' - uses: 'google-github-actions/setup-gcloud@v3' + - name: Set up Cloud SDK + uses: google-github-actions/setup-gcloud@v3 - - name: 'Use gcloud CLI' - run: 'gcloud builds submit --tag europe-west6-docker.pkg.dev/notely-484713/notely-ar-repo/notely:latest .' + - name: Use gcloud CLI + run: gcloud builds submit --tag europe-west6-docker.pkg.dev/notely-484713/notely-ar-repo/notely:latest . + + - name: Deploy to Cloud Run + run: gcloud run deploy notely --image europe-west6-docker.pkg.dev/notely-484713/notely-ar-repo/notely:latest --region europe-west6 --allow-unauthenticated --project notely-484713 --max-instances=4 diff --git a/static/index.html b/static/index.html index 72be101028c..5d4ad73c095 100644 --- a/static/index.html +++ b/static/index.html @@ -7,7 +7,7 @@ -

Notely

+

Welcome to Notely

From bbbde054a9edd0b4a5ae859c397f3dfacbd7a5a6 Mon Sep 17 00:00:00 2001 From: Gabriel Rodriguez Date: Mon, 19 Jan 2026 11:01:07 +0100 Subject: [PATCH 23/23] Add turso to CD pipeline --- .github/workflows/cd.yml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 48a5eea5a69..14f4b2be7d8 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -5,10 +5,13 @@ on: branches: [main] jobs: - Deploy: + deploy: name: Deploy runs-on: ubuntu-latest + env: + DATABASE_URL: ${{ secrets.DATABASE_URL }} + steps: - name: Check out code uses: actions/checkout@v4 @@ -18,9 +21,15 @@ jobs: with: go-version: "1.25.1" + - name: Install goose + run: go install github.com/pressly/goose/v3/cmd/goose@latest + - name: Run build script run: ./scripts/buildprod.sh + - name: Run migration + run: ./scripts/migrateup.sh + - id: auth uses: google-github-actions/auth@v2 with: @@ -34,4 +43,3 @@ jobs: - name: Deploy to Cloud Run run: gcloud run deploy notely --image europe-west6-docker.pkg.dev/notely-484713/notely-ar-repo/notely:latest --region europe-west6 --allow-unauthenticated --project notely-484713 --max-instances=4 -