Skip to content

Commit 88614ec

Browse files
committed
chore: parse dockerfile for build image tag
1 parent 00759d7 commit 88614ec

File tree

2 files changed

+9
-10
lines changed

2 files changed

+9
-10
lines changed

.github/workflows/package.yml

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
- develop
77
paths:
88
- ".github/workflows/package.yml"
9-
- "ansible/vars.yml"
9+
- "ansible/Dockerfile"
1010

1111
env:
1212
image: ghcr.io/supabase/plv8
@@ -19,17 +19,14 @@ jobs:
1919
settings:
2020
runs-on: ubuntu-20.04
2121
outputs:
22-
image_tag: ${{ steps.plv8_release.outputs.result }}-${{ steps.postgresql_major.outputs.result }}
22+
image_tag: ${{ steps.meta.outputs.image_tag }}
2323
steps:
2424
- uses: actions/checkout@v3
25-
- id: plv8_release
26-
uses: mikefarah/yq@master
27-
with:
28-
cmd: yq '.plv8_release' 'ansible/vars.yml'
29-
- id: postgresql_major
30-
uses: mikefarah/yq@master
31-
with:
32-
cmd: yq '.postgresql_major' 'ansible/vars.yml'
25+
- id: meta
26+
run: |
27+
plv8_release=$(grep -o 'plv8_release=.*' ansible/Dockerfile | head -1 | cut -d "=" -f 2)
28+
postgresql_major=$(grep -o 'postgresql_major=.*' ansible/Dockerfile | head -1 | cut -d "=" -f 2)
29+
echo "image_tag=${plv8_release}-pg${postgresql_major}" >> $GITHUB_OUTPUT
3330
3431
package_x86:
3532
needs: settings

ansible/Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
ARG postgresql_major=15
33
ARG postgresql_release=${postgresql_major}.1
44

5+
# Bump default build arg to build a package from source
6+
# Bump vars.yml to specify runtime package version
57
ARG sfcgal_release=1.3.10
68
ARG postgis_release=3.3.2
79
ARG pgrouting_release=3.4.1

0 commit comments

Comments
 (0)