Skip to content

Commit f0821df

Browse files
committed
feat: automated the update of PostgreSQL versions
Now we use the official PostgreSQL site to get the latest and supported versions of PostgreSQL, this will automatically: * Update the PostgreSQL version of the current supported versions * Deprecated unsupported versions of PostgreSQL Closes #153 Signed-off-by: Jonathan Gonzalez V <[email protected]>
1 parent f2cdbe4 commit f0821df

File tree

3 files changed

+10
-7
lines changed

3 files changed

+10
-7
lines changed

Diff for: .github/workflows/update.yml

+4
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,10 @@ jobs:
5050
echo "Updating Debian bookworm images"
5151
./Debian/update.sh -d bookworm
5252
53+
- name: Run update PostgreSQL versions
54+
run: |
55+
bash -x update_postgres.sh
56+
5357
- name: Diff
5458
run: |
5559
git status

Diff for: docker-bake.hcl

+1-7
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,7 @@ target "default" {
2626
"minimal",
2727
"standard"
2828
]
29-
pgVersion = [
30-
"13.18",
31-
"14.15",
32-
"15.10",
33-
"16.6",
34-
"17.2"
35-
]
29+
pgVersion = ["13.18","14.15","15.10","16.6","17.2"]
3630
base = [
3731
// renovate: datasource=docker versioning=loose
3832
"debian:bookworm-slim@sha256:40b107342c492725bc7aacbe93a49945445191ae364184a6d24fedb28172f6f7",

Diff for: update_postgres.sh

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
set -Eeuo pipefail
2+
3+
VERSIONS=$(curl -Ss -q https://www.postgresql.org/versions.json | jq -c '[.[] | select(.supported == true) | .major + "."+.latestMinor]')
4+
5+
sed -i -e 's/\(.*pgVersion = .*\)\(\[.*\]\)/\1'$VERSIONS'/' docker-bake.hcl

0 commit comments

Comments
 (0)