Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,16 @@ jobs:
- name: Check out code
uses: actions/checkout@v4

- name: Install goose
run: go install github.com/pressly/goose/v3/cmd/goose@latest

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: "1.22.5"

- name: Install goose
run: |
go install github.com/pressly/goose/v3/cmd/goose@latest
echo "$(go env GOPATH)/bin" >> $GITHUB_PATH

- name: Build App
run: ./scripts/buildprod.sh

Expand All @@ -38,6 +40,11 @@ jobs:
- name: Build GCP Image
run: gcloud builds submit --tag us-central1-docker.pkg.dev/elevated-watch-473719-n1/notely-ar-repo/notely:latest .

- name: Debug DB URL presence
run: |
test -n "$DATABASE_URL" || (echo "DATABASE_URL missing" && exit 1)
echo "Scheme: ${DATABASE_URL%%://*}://********@${DATABASE_URL#*@}" || true

- name: Migrate DB
run: goose -dir ./sql/schema postgres "$DATABASE_URL" up

Expand Down