From 846e715648b1ad3b9fe0e63392ebb8ce777189ae Mon Sep 17 00:00:00 2001 From: MarkDavidSanders Date: Thu, 23 Jul 2026 14:42:12 -0400 Subject: [PATCH 01/25] test change --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index c2bec0368b..b503094081 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! + +MarkDavidSanders's version of Boot.dev's Notely app. \ No newline at end of file From c678143a27e89973d8f73e45d500711b07c4aff0 Mon Sep 17 00:00:00 2001 From: MarkDavidSanders Date: Thu, 6 Aug 2026 16:21:02 -0400 Subject: [PATCH 02/25] workflows setup --- .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 0000000000..664032071d --- /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@v6 + + - name: Set up Go + uses: actions/setup-go@v6 + with: + go-version: "1.26.0" + + - name: Force Failure + run: (exit 1) \ No newline at end of file From 85c10571fc348367a9eb2187e03313e21d43c7c6 Mon Sep 17 00:00:00 2001 From: MarkDavidSanders Date: Thu, 6 Aug 2026 16:30:16 -0400 Subject: [PATCH 03/25] oopsie --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index b503094081..37d977d173 100644 --- a/README.md +++ b/README.md @@ -22,4 +22,6 @@ go build -o notely && ./notely 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! + + MarkDavidSanders's version of Boot.dev's Notely app. \ No newline at end of file From 0e61779c25e533a3f9b8febe8dadb2bf5821ceef Mon Sep 17 00:00:00 2001 From: MarkDavidSanders Date: Thu, 6 Aug 2026 16:32:32 -0400 Subject: [PATCH 04/25] asdf --- README.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/README.md b/README.md index 37d977d173..e04062724f 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ This repo contains the starter code for the "Notely" application for the "Learn Make sure you're on Go version 1.22+. -Create a `.env` file in the root of the project with the following contents: +Create a `.env` file in the durn root of the project with the following contents: ```bash PORT="8080" @@ -22,6 +22,4 @@ go build -o notely && ./notely 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! - - MarkDavidSanders's version of Boot.dev's Notely app. \ No newline at end of file From 27de28f83f0c8b6ba697fedc4af0ebcde2441f03 Mon Sep 17 00:00:00 2001 From: MarkDavidSanders Date: Thu, 6 Aug 2026 16:38:03 -0400 Subject: [PATCH 05/25] sdf --- .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 664032071d..a2cf2a837a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,4 +19,4 @@ jobs: go-version: "1.26.0" - name: Force Failure - run: (exit 1) \ No newline at end of file + run: (exit 1) From a4ff8e12fa188944db9ca75bd81c93d12e207fcd Mon Sep 17 00:00:00 2001 From: MarkDavidSanders Date: Thu, 6 Aug 2026 16:42:37 -0400 Subject: [PATCH 06/25] --- --- .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 a2cf2a837a..664032071d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,4 +19,4 @@ jobs: go-version: "1.26.0" - name: Force Failure - run: (exit 1) + run: (exit 1) \ No newline at end of file From 9ad6e1083d981ef6fa5d5edc7c12a407a85da0f5 Mon Sep 17 00:00:00 2001 From: MarkDavidSanders Date: Thu, 6 Aug 2026 16:46:05 -0400 Subject: [PATCH 07/25] as --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index e04062724f..f76894e6a7 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,7 @@ This repo contains the starter code for the "Notely" application for the "Learn CICD" course on [Boot.dev](https://boot.dev). + ## Local Development Make sure you're on Go version 1.22+. From 9cf8bcf4df738167c0849a4fed4bef781d625144 Mon Sep 17 00:00:00 2001 From: MarkDavidSanders Date: Thu, 6 Aug 2026 16:47:01 -0400 Subject: [PATCH 08/25] ------- --- .github/workflows/ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 664032071d..21dded1203 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,4 +19,5 @@ jobs: go-version: "1.26.0" - name: Force Failure - run: (exit 1) \ No newline at end of file + run: (exit 1) + \ No newline at end of file From 11f0f2e3cae39ef189d7ae3eb7549dbb8701712f Mon Sep 17 00:00:00 2001 From: MarkDavidSanders Date: Thu, 6 Aug 2026 16:49:52 -0400 Subject: [PATCH 09/25] -fs-df--- --- .github/workflows/ci.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 21dded1203..664032071d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,5 +19,4 @@ jobs: go-version: "1.26.0" - name: Force Failure - run: (exit 1) - \ No newline at end of file + run: (exit 1) \ No newline at end of file From ade6e1dff81b431b23c0a01fca5fece70637a0db Mon Sep 17 00:00:00 2001 From: MarkDavidSanders Date: Thu, 6 Aug 2026 16:51:31 -0400 Subject: [PATCH 10/25] troubleshooting --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 664032071d..c102d9919e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,6 +1,7 @@ name: ci on: + workflow_dispatch: pull_request: branches: [main] From 7f924ce7a7f9291e7b9a20f98b5fab30c4af3bc6 Mon Sep 17 00:00:00 2001 From: MarkDavidSanders Date: Mon, 10 Aug 2026 13:58:45 -0400 Subject: [PATCH 11/25] go version --- .github/workflows/ci.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c102d9919e..204b8d79e7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,5 +19,7 @@ jobs: with: go-version: "1.26.0" - - name: Force Failure - run: (exit 1) \ No newline at end of file + # - name: Force Failure + # run: (exit 1) + - name: Display Go version + run: go version \ No newline at end of file From cfd0d2664be2cf549c177d0accb6af81aaf17a26 Mon Sep 17 00:00:00 2001 From: MarkDavidSanders Date: Mon, 10 Aug 2026 14:38:33 -0400 Subject: [PATCH 12/25] test test --- .github/workflows/ci.yml | 2 +- internal/auth/get_api_key_test.go | 35 +++++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 internal/auth/get_api_key_test.go diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 204b8d79e7..6968756272 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,4 +22,4 @@ jobs: # - name: Force Failure # run: (exit 1) - name: Display Go version - run: go version \ No newline at end of file + run: go test ./... \ No newline at end of file diff --git a/internal/auth/get_api_key_test.go b/internal/auth/get_api_key_test.go new file mode 100644 index 0000000000..935f838d8b --- /dev/null +++ b/internal/auth/get_api_key_test.go @@ -0,0 +1,35 @@ +package auth + +import ( + "net/http/httptest" + "testing" +) + +var testReq = httptest.NewRequest("GET", "/api", nil) + +func TestGetAPIKeyGoodAuth(t *testing.T) { + testReq.Header.Set("Authorization", "ApiKey42069") + want := "42069" + got, err := GetAPIKey(testReq.Header) + if err != nil { + t.Errorf("GetAPIKey() returned an error: %v", err) + } + if got != want { + t.Errorf("GetAPIKey() = %v, want %v", got, want) + } +} + +func TestGetAPIKeyBadAuth(t *testing.T) { + testReq.Header.Set("Authorization", "Bearer 42069") + got, err := GetAPIKey(testReq.Header) + if err == nil { + t.Errorf("GetAPIKey() did not return an error; got %v", got) + } +} + +func TestGetAPIKeyNoAuth(t *testing.T) { + got, err := GetAPIKey(testReq.Header) + if err == nil { + t.Errorf("GetAPIKey() did not flag missing header as expected; got %v", got) + } +} From 92c02f21f13f4c703248dfe8b4b9902cb1b21e55 Mon Sep 17 00:00:00 2001 From: MarkDavidSanders Date: Mon, 10 Aug 2026 14:40:38 -0400 Subject: [PATCH 13/25] test fix --- internal/auth/get_api_key_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/auth/get_api_key_test.go b/internal/auth/get_api_key_test.go index 935f838d8b..1af1170136 100644 --- a/internal/auth/get_api_key_test.go +++ b/internal/auth/get_api_key_test.go @@ -8,7 +8,7 @@ import ( var testReq = httptest.NewRequest("GET", "/api", nil) func TestGetAPIKeyGoodAuth(t *testing.T) { - testReq.Header.Set("Authorization", "ApiKey42069") + testReq.Header.Set("Authorization", "ApiKey 42069") want := "42069" got, err := GetAPIKey(testReq.Header) if err != nil { From b9d3c695250a09e9ee5ee1282b879fb5d5885131 Mon Sep 17 00:00:00 2001 From: MarkDavidSanders Date: Mon, 10 Aug 2026 14:43:52 -0400 Subject: [PATCH 14/25] add code coverage --- .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 6968756272..04724d569f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,4 +22,4 @@ jobs: # - name: Force Failure # run: (exit 1) - name: Display Go version - run: go test ./... \ No newline at end of file + run: go test -cover ./... \ No newline at end of file From ceadcd3b1b99721fa5b0bc303c0cb9e13cc10b96 Mon Sep 17 00:00:00 2001 From: MarkDavidSanders Date: Mon, 10 Aug 2026 14:45:44 -0400 Subject: [PATCH 15/25] CI test name change --- .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 04724d569f..aae1332d4c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,5 +21,5 @@ jobs: # - name: Force Failure # run: (exit 1) - - name: Display Go version + - name: Run all tests run: go test -cover ./... \ No newline at end of file From 1aab6cf6fa253e0719823f7dd48b92b26c3aa9a6 Mon Sep 17 00:00:00 2001 From: MarkDavidSanders Date: Mon, 10 Aug 2026 14:49:38 -0400 Subject: [PATCH 16/25] README badge --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index f76894e6a7..1a0bc07f7d 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ +![CI test results](https://github.com/MarkDavidSanders/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 7b10b18f6bf6d74bff8c0485fa107646703debd7 Mon Sep 17 00:00:00 2001 From: MarkDavidSanders Date: Mon, 10 Aug 2026 14:57:51 -0400 Subject: [PATCH 17/25] add style job --- .github/workflows/ci.yml | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index aae1332d4c..e56a4d797f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,4 +22,20 @@ jobs: # - name: Force Failure # run: (exit 1) - name: Run all tests - run: go test -cover ./... \ No newline at end of file + run: go test -cover ./... + + style: + name: Style + runs-on: ubuntu-latest + + steps: + - name: Check out code + uses: actions/checkout@v6 + + - name: Set up Go + uses: actions/setup-go@v6 + with: + go-version: "1.26.0" + + - name: Run go fmt + run: test -z $(go fmt ./...) \ No newline at end of file From 69b846c0349e7549e3c98d8ebc8add8f3fd4b822 Mon Sep 17 00:00:00 2001 From: MarkDavidSanders Date: Tue, 11 Aug 2026 11:51:17 -0400 Subject: [PATCH 18/25] staticcheck --- .github/workflows/ci.yml | 8 +++++++- main.go | 5 +++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e56a4d797f..ebfa10753a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -38,4 +38,10 @@ jobs: go-version: "1.26.0" - name: Run go fmt - run: test -z $(go fmt ./...) \ No newline at end of file + run: test -z $(go fmt ./...) + + - name: Install staticcheck + run: go install honnef.co/go/tools/cmd/staticcheck@latest + + - name: Run staticcheck + run: staticcheck ./... \ No newline at end of file diff --git a/main.go b/main.go index 19d7366c5f..a621713c2b 100644 --- a/main.go +++ b/main.go @@ -96,3 +96,8 @@ func main() { log.Printf("Serving on port: %s\n", port) log.Fatal(srv.ListenAndServe()) } + +func unused() { + // this function does nothing + // and is called nowhere +} From 2fd14f06dcbe57c009c0dee009b71415c4588e3b Mon Sep 17 00:00:00 2001 From: MarkDavidSanders Date: Tue, 11 Aug 2026 11:52:35 -0400 Subject: [PATCH 19/25] staticcheck fix --- main.go | 5 ----- 1 file changed, 5 deletions(-) diff --git a/main.go b/main.go index a621713c2b..19d7366c5f 100644 --- a/main.go +++ b/main.go @@ -96,8 +96,3 @@ func main() { log.Printf("Serving on port: %s\n", port) log.Fatal(srv.ListenAndServe()) } - -func unused() { - // this function does nothing - // and is called nowhere -} From 9d7437b8b394355e1bce17c35c89a6d13c991098 Mon Sep 17 00:00:00 2001 From: MarkDavidSanders Date: Tue, 11 Aug 2026 11:58:02 -0400 Subject: [PATCH 20/25] gosec install --- .github/workflows/ci.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ebfa10753a..05d62a4781 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,10 +19,14 @@ jobs: with: go-version: "1.26.0" - # - name: Force Failure - # run: (exit 1) - name: Run all 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 From f9a5e7ee1a39cffee265a2ce661efd8680766d2e Mon Sep 17 00:00:00 2001 From: MarkDavidSanders Date: Tue, 11 Aug 2026 12:26:01 -0400 Subject: [PATCH 21/25] go sec fixes --- json.go | 4 +++- main.go | 7 +++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/json.go b/json.go index 1e6e7985e1..bdd2719f7d 100644 --- a/json.go +++ b/json.go @@ -30,5 +30,7 @@ func respondWithJSON(w http.ResponseWriter, code int, payload interface{}) { return } w.WriteHeader(code) - w.Write(dat) + if _, err := w.Write(dat); err != nil { + log.Printf("Failed to write response: %v", err) + } } diff --git a/main.go b/main.go index 19d7366c5f..1c84a4add5 100644 --- a/main.go +++ b/main.go @@ -7,6 +7,7 @@ import ( "log" "net/http" "os" + "time" "github.com/go-chi/chi" "github.com/go-chi/cors" @@ -89,10 +90,12 @@ func main() { router.Mount("/v1", v1Router) srv := &http.Server{ - Addr: ":" + port, - Handler: router, + Addr: ":" + port, + Handler: router, + ReadHeaderTimeout: 2 * time.Second, } + // #nosec G706 -- False positive: server error logging on exit log.Printf("Serving on port: %s\n", port) log.Fatal(srv.ListenAndServe()) } From ddb8f6e4f30912c40b3556886dde8fcd4e2a30a6 Mon Sep 17 00:00:00 2001 From: MarkDavidSanders Date: Tue, 11 Aug 2026 12:40:56 -0400 Subject: [PATCH 22/25] CD.yml and main.go tweak --- .github/workflows/cd.yml | 20 ++++++++++++++++++++ main.go | 4 ++-- 2 files changed, 22 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/cd.yml diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml new file mode 100644 index 0000000000..2234e1a9bd --- /dev/null +++ b/.github/workflows/cd.yml @@ -0,0 +1,20 @@ +on: + push: + branches: [main] + +jobs: + deploy: + name: Deploy + runs-on: ubuntu-latest + + steps: + - name: Check out code + uses: actions/checkout@v6 + + - name: Set up Go + uses: actions/setup-go@v6 + with: + go-version: "1.26.0" + + - name: Build app + run: ./scripts/buildprod.sh \ No newline at end of file diff --git a/main.go b/main.go index 1c84a4add5..65a9537337 100644 --- a/main.go +++ b/main.go @@ -7,6 +7,7 @@ import ( "log" "net/http" "os" + "strconv" "time" "github.com/go-chi/chi" @@ -95,7 +96,6 @@ func main() { ReadHeaderTimeout: 2 * time.Second, } - // #nosec G706 -- False positive: server error logging on exit - log.Printf("Serving on port: %s\n", port) + log.Printf("Serving on port: %s", strconv.Quote(port)) log.Fatal(srv.ListenAndServe()) } From 512792e733cb642213ba7608942526900a0dc98c Mon Sep 17 00:00:00 2001 From: MarkDavidSanders Date: Tue, 11 Aug 2026 13:31:55 -0400 Subject: [PATCH 23/25] here goes nothing --- .github/workflows/cd.yml | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 2234e1a9bd..b0a26ce09c 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -17,4 +17,18 @@ jobs: go-version: "1.26.0" - name: Build app - run: ./scripts/buildprod.sh \ No newline at end of file + 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 info' + + - name: 'Build and push Docker image' + run: gcloud builds submit --tag us-central1-docker.pkg.dev/notely-505216/notely-ar-repo/notely:v1 . \ No newline at end of file From 1256c06a2f25b4af8a717e452175bcadc2524a25 Mon Sep 17 00:00:00 2001 From: MarkDavidSanders Date: Tue, 11 Aug 2026 14:38:50 -0400 Subject: [PATCH 24/25] Deploy app to Cloud Run --- .github/workflows/cd.yml | 5 ++++- .gitignore | 1 + static/index.html | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index b0a26ce09c..43bc48a9e9 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -31,4 +31,7 @@ jobs: run: 'gcloud info' - name: 'Build and push Docker image' - run: gcloud builds submit --tag us-central1-docker.pkg.dev/notely-505216/notely-ar-repo/notely:v1 . \ No newline at end of file + run: gcloud builds submit --tag us-central1-docker.pkg.dev/notely-505216/notely-ar-repo/notely:latest . + + - name: Deploy to Cloud Run + run: gcloud run deploy notely --image us-central1-docker.pkg.dev/notely-505216/notely-ar-repo/notely:latest --region us-central1 --allow-unauthenticated --project notely-505216 --max-instances=4 \ No newline at end of file diff --git a/.gitignore b/.gitignore index 2092f54e78..c5cd3b1472 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ out .env learn-cicd-starter notely +.DS_Store diff --git a/static/index.html b/static/index.html index 72be101028..5d4ad73c09 100644 --- a/static/index.html +++ b/static/index.html @@ -7,7 +7,7 @@ -

Notely

+

Welcome to Notely

From 4557bc3e51d0681f122d6aa53fda84526458bf5d Mon Sep 17 00:00:00 2001 From: MarkDavidSanders Date: Wed, 12 Aug 2026 14:07:08 -0400 Subject: [PATCH 25/25] CD Goose install / database migration / git diff --- .github/workflows/cd.yml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 43bc48a9e9..60b7ad33da 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -7,6 +7,9 @@ jobs: name: Deploy runs-on: ubuntu-latest + env: + DATABASE_URL: ${{ secrets.DATABASE_URL }} + steps: - name: Check out code uses: actions/checkout@v6 @@ -16,6 +19,9 @@ jobs: with: go-version: "1.26.0" + - name: Install goose + run: go install github.com/pressly/goose/v3/cmd/goose@latest + - name: Build app run: ./scripts/buildprod.sh @@ -33,5 +39,11 @@ jobs: - name: 'Build and push Docker image' run: gcloud builds submit --tag us-central1-docker.pkg.dev/notely-505216/notely-ar-repo/notely:latest . + - name: 'Migrate database' + run: ./scripts/migrateup.sh + - name: Deploy to Cloud Run - run: gcloud run deploy notely --image us-central1-docker.pkg.dev/notely-505216/notely-ar-repo/notely:latest --region us-central1 --allow-unauthenticated --project notely-505216 --max-instances=4 \ No newline at end of file + run: gcloud run deploy notely --image us-central1-docker.pkg.dev/notely-505216/notely-ar-repo/notely:latest --region us-central1 --allow-unauthenticated --project notely-505216 --max-instances=4 + + - name: 'Git diff' + run: git diff HEAD \ No newline at end of file