Skip to content

Commit 7bb330a

Browse files
committed
Chore: Use last release + git hash in Docker edge versions
1 parent ffb3067 commit 7bb330a

2 files changed

Lines changed: 17 additions & 2 deletions

File tree

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

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ jobs:
99
steps:
1010
- name: Checkout repository
1111
uses: actions/checkout@v6
12+
with:
13+
fetch-depth: 0 # required for github-action-get-previous-tag
1214

1315
- name: Set up QEMU
1416
uses: docker/setup-qemu-action@v3
@@ -29,7 +31,12 @@ jobs:
2931
username: ${{ github.repository_owner }}
3032
password: ${{ github.token }}
3133

32-
- uses: benjlevesque/short-sha@v3.0
34+
- name: Get previous git tag
35+
uses: WyriHaximus/github-action-get-previous-tag@v2
36+
id: previous-tag
37+
38+
- name: Get short SHA
39+
uses: benjlevesque/short-sha@v3.0
3340
id: short-sha
3441

3542
- name: Build and push
@@ -38,7 +45,7 @@ jobs:
3845
context: .
3946
platforms: linux/386,linux/amd64,linux/arm64
4047
build-args: |
41-
"VERSION=edge-${{ steps.short-sha.outputs.sha }}"
48+
"VERSION=${{ steps.previous-tag.outputs.tag }}-${{ steps.short-sha.outputs.sha }}"
4249
push: true
4350
tags: |
4451
axllent/mailpit:edge

server/ui-src/components/AppAbout.vue

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,13 @@ export default {
2525
};
2626
},
2727
28+
computed: {
29+
isEdgeBuild() {
30+
const re = /^(v\d+.\d+.\d+-)/i;
31+
return re.test(mailbox.appInfo.Version);
32+
},
33+
},
34+
2835
methods: {
2936
loadInfo() {
3037
this.get(this.resolve("/api/v1/info"), false, (response) => {
@@ -98,6 +105,7 @@ export default {
98105
<h5 id="AppInfoModalLabel" class="modal-title">
99106
Mailpit
100107
<code>({{ mailbox.appInfo.Version }})</code>
108+
<span v-if="isEdgeBuild" class="badge bg-info text-dark ms-2">edge build</span>
101109
</h5>
102110
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
103111
</div>

0 commit comments

Comments
 (0)