Skip to content

Commit

Permalink
Try again
Browse files Browse the repository at this point in the history
  • Loading branch information
ankane committed Jun 17, 2024
1 parent 0852840 commit b1b5546
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-24.04]
postgres-version: [16, 15, 14, 13, 12]
postgres-version: [16, 15] #, 14, 13, 12]
steps:
- uses: actions/checkout@v4
- uses: ./.
Expand Down
6 changes: 3 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ host all all ::1/128 md5
execSync(`echo "${contents}" | sudo tee ${dir}/pg_hba.conf`);
}

const defaultVersion = 14;
const defaultVersion = process.env['ImageOS'] == 'ubuntu24' ? 16 : 14;
const postgresVersion = parseFloat(process.env['INPUT_POSTGRES-VERSION'] || defaultVersion);
if (![17, 16, 15, 14, 13, 12, 11, 10, 9.6].includes(postgresVersion)) {
throw `Postgres version not supported: ${postgresVersion}`;
Expand Down Expand Up @@ -114,9 +114,9 @@ if (isMac()) {
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) {
if (postgresVersion != defaultVersion) {
// remove previous cluster so port 5432 is used
run(`sudo pg_dropcluster 14 main`);
run(`sudo pg_dropcluster ${defaultVersion} main`);

// install new version
run(`sudo apt-get update -o Dir::Etc::sourcelist="sources.list.d/pgdg.list" -o Dir::Etc::sourceparts="-" -o APT::Get::List-Cleanup="0"`);
Expand Down

0 comments on commit b1b5546

Please sign in to comment.