mirror of
https://github.com/axllent/mailpit.git
synced 2026-06-27 22:46:09 +00:00
56 lines
1.9 KiB
YAML
56 lines
1.9 KiB
YAML
on:
|
|
release:
|
|
types: [created]
|
|
|
|
name: Build docker images
|
|
jobs:
|
|
docker:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
with:
|
|
persist-credentials: false
|
|
|
|
- name: Set up QEMU
|
|
uses: docker/setup-qemu-action@06116385d9baf250c9f4dcb4858b16962ea869c3 # v4.1.0
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@d7f5e7f509e45cec5c76c4d5afdd7de93d0b3df5 # v4.1.0
|
|
|
|
- name: Log into Docker Hub
|
|
uses: docker/login-action@650006c6eb7dba73a995cc03b0b2d7f5ca915bee # v4.2.0
|
|
with:
|
|
username: ${{ secrets.DOCKER_USERNAME }}
|
|
password: ${{ secrets.DOCKER_ACCESS_TOKEN }}
|
|
|
|
- name: Log into GitHub Container Registry
|
|
uses: docker/login-action@650006c6eb7dba73a995cc03b0b2d7f5ca915bee # v4.2.0
|
|
with:
|
|
registry: ghcr.io
|
|
username: ${{ github.repository_owner }}
|
|
password: ${{ github.token }}
|
|
|
|
- name: Parse semver
|
|
id: semver_parser
|
|
uses: booxmedialtd/ws-action-parse-semver@7784200024d6b3fc01253e617ec0168daf603de3 # v1.4.7
|
|
with:
|
|
input_string: '${{ github.ref_name }}'
|
|
version_extractor_regex: 'v(.*)$'
|
|
|
|
- name: Build and push
|
|
uses: docker/build-push-action@f9f3042f7e2789586610d6e8b85c8f03e5195baf # v7.2.0
|
|
with:
|
|
context: .
|
|
platforms: linux/386,linux/amd64,linux/arm64
|
|
build-args: |
|
|
"VERSION=${{ github.ref_name }}"
|
|
push: true
|
|
tags: |
|
|
axllent/mailpit:latest
|
|
axllent/mailpit:${{ github.ref_name }}
|
|
axllent/mailpit:v${{ steps.semver_parser.outputs.major }}.${{ steps.semver_parser.outputs.minor }}
|
|
ghcr.io/${{ github.repository }}:${{ github.ref_name }}
|
|
ghcr.io/${{ github.repository }}:v${{ steps.semver_parser.outputs.major }}.${{ steps.semver_parser.outputs.minor }}
|
|
ghcr.io/${{ github.repository }}:latest
|