Skip to content

Commit a8fe364

Browse files
author
Dmytro Bondar
authored
fix: set image version from Dockerfile arg (#18)
1 parent 4a75328 commit a8fe364

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

.github/workflows/docker.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ jobs:
1818
runs-on: ubuntu-latest
1919
steps:
2020
- uses: actions/checkout@v4
21+
- name: Parse version
22+
id: version
23+
run: echo "VERSION=$(awk -F= '/^ARG SQLCMD_VERSION/ {print $2}' Dockerfile)" >> $GITHUB_OUTPUT
24+
2125
- uses: docker/setup-qemu-action@v3
2226
- uses: docker/setup-buildx-action@v3
2327

@@ -40,6 +44,9 @@ jobs:
4044
images: |
4145
${{ github.repository }}
4246
ghcr.io/${{ github.repository }}
47+
tags: |
48+
type=raw,value=${{ steps.version.outputs.VERSION }}
49+
type=raw,value=latest,enable={{is_default_branch}}
4350
4451
- uses: docker/build-push-action@v6
4552
with:

0 commit comments

Comments
 (0)