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:
150150 PGUSER : supabase_admin
151151 PGPASSWORD : ${{ env.POSTGRES_PASSWORD }}
152152
153+ - name : Update Dockerfile.dbmate version
154+ run : |
155+ sed -i 's/%VERSION%/${{ env.PGMAJOR }}/g' migrations/Dockerfile.dbmate
156+
153157 - name : verify schema.sql is committed
154158 run : |
155159 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:
3333 command : pg_prove /tests/test.sql
3434
3535 dbmate :
36- image : amacneil/dbmate:1.16.2
36+ build :
37+ context : .
38+ dockerfile : Dockerfile.dbmate
3739 depends_on :
3840 db :
3941 condition : service_healthy
You can’t perform that action at this time.
0 commit comments