mirror of
https://github.com/axllent/mailpit.git
synced 2026-06-27 22:46:09 +00:00
Chore: Use last release + git hash in Docker edge versions
This commit is contained in:
11
.github/workflows/build-docker-edge.yml
vendored
11
.github/workflows/build-docker-edge.yml
vendored
@@ -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
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user