Skip to content

Commit da7b823

Browse files
committed
Build: Tag Docker edge build with next patch versions
1 parent 0702241 commit da7b823

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

.github/workflows/build-docker-edge.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,22 @@ jobs:
3939
uses: benjlevesque/short-sha@v3.0
4040
id: short-sha
4141

42+
- name: Calculate next patch version
43+
id: next-version
44+
run: |
45+
TAG="${{ steps.previous-tag.outputs.tag }}"
46+
VERSION="${TAG#v}"
47+
BASE="${VERSION%.*}"
48+
PATCH="${VERSION##*.}"
49+
echo "version=v${BASE}.$((PATCH + 1))-${{ steps.short-sha.outputs.sha }}" >> "$GITHUB_OUTPUT"
50+
4251
- name: Build and push
4352
uses: docker/build-push-action@v7
4453
with:
4554
context: .
4655
platforms: linux/386,linux/amd64,linux/arm64
4756
build-args: |
48-
"VERSION=${{ steps.previous-tag.outputs.tag }}-${{ steps.short-sha.outputs.sha }}"
57+
"VERSION=${{ steps.next-version.outputs.version }}"
4958
push: true
5059
tags: |
5160
axllent/mailpit:edge

0 commit comments

Comments
 (0)