Chore: Use last release + git hash in Docker edge versions

This commit is contained in:
Ralph Slooten
2026-03-02 22:38:38 +13:00
parent ffb3067680
commit 7bb330a07a
2 changed files with 17 additions and 2 deletions

View File

@@ -9,6 +9,8 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v6
with:
fetch-depth: 0 # required for github-action-get-previous-tag
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
@@ -29,7 +31,12 @@ jobs:
username: ${{ github.repository_owner }}
password: ${{ github.token }}
- uses: benjlevesque/short-sha@v3.0
- name: Get previous git tag
uses: WyriHaximus/github-action-get-previous-tag@v2
id: previous-tag
- name: Get short SHA
uses: benjlevesque/short-sha@v3.0
id: short-sha
- name: Build and push
@@ -38,7 +45,7 @@ jobs:
context: .
platforms: linux/386,linux/amd64,linux/arm64
build-args: |
"VERSION=edge-${{ steps.short-sha.outputs.sha }}"
"VERSION=${{ steps.previous-tag.outputs.tag }}-${{ steps.short-sha.outputs.sha }}"
push: true
tags: |
axllent/mailpit:edge

View File

@@ -25,6 +25,13 @@ export default {
};
},
computed: {
isEdgeBuild() {
const re = /^(v\d+.\d+.\d+-)/i;
return re.test(mailbox.appInfo.Version);
},
},
methods: {
loadInfo() {
this.get(this.resolve("/api/v1/info"), false, (response) => {
@@ -98,6 +105,7 @@ export default {
<h5 id="AppInfoModalLabel" class="modal-title">
Mailpit
<code>({{ mailbox.appInfo.Version }})</code>
<span v-if="isEdgeBuild" class="badge bg-info text-dark ms-2">edge build</span>
</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>