Skip to content

Commit

Permalink
Added experimental support for Postgres 16 [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
ankane committed Jun 10, 2023
1 parent 57045c3 commit cf6850f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ host all all ::1/128 md5

const defaultVersion = 14;
const postgresVersion = parseFloat(process.env['INPUT_POSTGRES-VERSION'] || defaultVersion);
if (![15, 14, 13, 12, 11, 10, 9.6].includes(postgresVersion)) {
if (![16, 15, 14, 13, 12, 11, 10, 9.6].includes(postgresVersion)) {
throw `Postgres version not supported: ${postgresVersion}`;
}

Expand Down Expand Up @@ -110,8 +110,9 @@ if (isMac()) {
// development snapshots require this and -snapshot after pgdg
// https://wiki.postgresql.org/wiki/Apt/FAQ
const suffix = postgresVersion == 16 ? ` ${postgresVersion}` : "";
const snapshot = postgresVersion == 16 ? `-snapshot` : "";
run(`curl -s https://www.postgresql.org/media/keys/ACCC4CF8.asc | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/apt.postgresql.org.gpg >/dev/null`)
run(`echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main${suffix}" | sudo tee /etc/apt/sources.list.d/pgdg.list`);
run(`echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg${snapshot} main${suffix}" | sudo tee /etc/apt/sources.list.d/pgdg.list`);
}

if (postgresVersion != 14) {
Expand Down

0 comments on commit cf6850f

Please sign in to comment.