Skip to content

Commit 7beba62

Browse files
committed
update tags and image names
1 parent d3cfaa3 commit 7beba62

1 file changed

Lines changed: 9 additions & 6 deletions

File tree

.github/workflows/docker.yml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ on:
99

1010
env:
1111
REGISTRY: ghcr.io
12-
IMAGE_NAME: ${{ github.repository }}
12+
IMAGE_NAME: constructive-io/docker/postgres-plus
13+
PG_VERSION: '17'
1314

1415
jobs:
1516
build:
@@ -42,11 +43,11 @@ jobs:
4243
with:
4344
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
4445
tags: |
45-
type=ref,event=branch
46-
type=ref,event=pr
47-
type=semver,pattern={{version}}
48-
type=semver,pattern={{major}}.{{minor}}
49-
type=sha
46+
type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' }}
47+
type=raw,value=${{ env.PG_VERSION }},enable=${{ github.ref == 'refs/heads/main' }}
48+
type=sha,format=short,prefix=
49+
type=semver,pattern={{version}},enable=${{ startsWith(github.ref, 'refs/tags/v') }}
50+
type=semver,pattern={{major}}.{{minor}},enable=${{ startsWith(github.ref, 'refs/tags/v') }}
5051
5152
- name: Build and push
5253
uses: docker/build-push-action@v6
@@ -56,5 +57,7 @@ jobs:
5657
push: ${{ github.event_name != 'pull_request' }}
5758
tags: ${{ steps.meta.outputs.tags }}
5859
labels: ${{ steps.meta.outputs.labels }}
60+
build-args: |
61+
PG_VERSION=${{ env.PG_VERSION }}
5962
cache-from: type=gha
6063
cache-to: type=gha,mode=max

0 commit comments

Comments
 (0)