File tree Expand file tree Collapse file tree 1 file changed +28
-5
lines changed Expand file tree Collapse file tree 1 file changed +28
-5
lines changed Original file line number Diff line number Diff line change 1
- name : Release all major versions on Dockerhub
1
+ name : Release PostgreSQL Images on Dockerhub
2
2
3
3
on :
4
4
push :
5
5
branches :
6
6
- develop
7
7
- release/*
8
- - sam/docker-oriole17
9
8
paths :
10
- - " .github/workflows/dockerhub-release-matrix.yml"
11
- - " anisble/vars.yml"
9
+ - " .github/workflows/dockerhub-release.yml"
10
+ - " common-nix.vars*"
11
+ - " ansible/vars.yml"
12
+ - " Dockerfile-*"
12
13
workflow_dispatch :
13
-
14
+
14
15
jobs :
15
16
prepare :
16
17
runs-on : ubuntu-latest
70
71
build_args : ${{ steps.args.outputs.result }}
71
72
steps :
72
73
- uses : actions/checkout@v3
74
+
75
+ - uses : DeterminateSystems/nix-installer-action@main
76
+
77
+ - name : Set PostgreSQL version environment variable
78
+ run : echo "POSTGRES_MAJOR_VERSION=${{ matrix.version }}" >> $GITHUB_ENV
79
+
80
+ - name : Generate common-nix.vars.pkr.hcl
81
+ run : |
82
+ # For orioledb versions, we need to handle the version lookup differently
83
+ if [[ "${{ matrix.version }}" == "orioledb-"* ]]; then
84
+ MAJOR_VERSION="${{ matrix.version #orioledb-}}"
85
+ PG_VERSION=$(nix run nixpkgs#yq -- '.postgres_release["postgres'$MAJOR_VERSION'_orioledb"]' ansible/vars.yml)
86
+ else
87
+ PG_VERSION=$(nix run nixpkgs#yq -- '.postgres_release["postgres${{ matrix.version }}"]' ansible/vars.yml)
88
+ fi
89
+
90
+ PG_VERSION=$(echo $PG_VERSION | tr -d '"') # Remove any surrounding quotes
91
+ echo 'postgres-version = "'$PG_VERSION'"' > common-nix.vars.pkr.hcl
92
+ # Ensure there's a newline at the end of the file
93
+ echo "" >> common-nix.vars.pkr.hcl
94
+
73
95
- id : settings
74
96
run : sed -r 's/(\s|\")+//g' common-nix.vars.pkr.hcl >> $GITHUB_OUTPUT
97
+
75
98
- id : args
76
99
uses : mikefarah/yq@master
77
100
with :
You can’t perform that action at this time.
0 commit comments