Skip to content

Commit d56518b

Browse files
FIX (deploy): Fix migrations run on deploy
1 parent 6419502 commit d56518b

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

.github/workflows/ci-release.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ name: CI and Release
33
on:
44
push:
55
branches: [main]
6+
pull_request:
7+
branches: [main]
68
workflow_dispatch:
79

810
jobs:
@@ -159,7 +161,7 @@ jobs:
159161
run: |
160162
cd backend
161163
go install github.com/pressly/goose/v3/cmd/goose@latest
162-
goose -dir migrations postgres "postgres://postgres:Q1234567@localhost:5437/postgresus?sslmode=disable" up
164+
goose up
163165
164166
- name: Run Go tests
165167
run: |
@@ -175,7 +177,7 @@ jobs:
175177
determine-version:
176178
runs-on: ubuntu-latest
177179
needs: [test-backend, lint-frontend]
178-
if: ${{ !contains(github.event.head_commit.message, '[skip-release]') }}
180+
if: ${{ github.ref == 'refs/heads/main' && !contains(github.event.head_commit.message, '[skip-release]') }}
179181
outputs:
180182
should_release: ${{ steps.version_bump.outputs.should_release }}
181183
new_version: ${{ steps.version_bump.outputs.new_version }}
@@ -268,7 +270,7 @@ jobs:
268270
build-only:
269271
runs-on: ubuntu-latest
270272
needs: [test-backend, lint-frontend]
271-
if: ${{ contains(github.event.head_commit.message, '[skip-release]') }}
273+
if: ${{ github.ref == 'refs/heads/main' && contains(github.event.head_commit.message, '[skip-release]') }}
272274
steps:
273275
- name: Check out code
274276
uses: actions/checkout@v4

0 commit comments

Comments
 (0)