File tree Expand file tree Collapse file tree 3 files changed +17
-1
lines changed Expand file tree Collapse file tree 3 files changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -150,6 +150,10 @@ jobs:
150
150
PGUSER : supabase_admin
151
151
PGPASSWORD : ${{ env.POSTGRES_PASSWORD }}
152
152
153
+ - name : Update Dockerfile.dbmate version
154
+ run : |
155
+ sed -i 's/%VERSION%/${{ env.PGMAJOR }}/g' migrations/Dockerfile.dbmate
156
+
153
157
- name : verify schema.sql is committed
154
158
run : |
155
159
docker compose -f migrations/docker-compose.yaml up db dbmate --abort-on-container-exit
Original file line number Diff line number Diff line change
1
+ FROM amacneil/dbmate:1.16.2
2
+
3
+ # Install PostgreSQL 16 client
4
+ RUN apt-get update && apt-get install -y wget gnupg2 lsb-release
5
+ RUN wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add -
6
+ RUN echo "deb http://apt.postgresql.org/pub/repos/apt/ `lsb_release -cs`-pgdg main" | tee /etc/apt/sources.list.d/pgdg.list
7
+ RUN apt-get update && apt-get install -y postgresql-client-%VERSION%
8
+
9
+ # Set the PATH to use the new PostgreSQL 16 binaries
10
+ ENV PATH="/usr/lib/postgresql/%VERSION%/bin:${PATH}"
Original file line number Diff line number Diff line change @@ -33,7 +33,9 @@ services:
33
33
command : pg_prove /tests/test.sql
34
34
35
35
dbmate :
36
- image : amacneil/dbmate:1.16.2
36
+ build :
37
+ context : .
38
+ dockerfile : Dockerfile.dbmate
37
39
depends_on :
38
40
db :
39
41
condition : service_healthy
You can’t perform that action at this time.
0 commit comments