mirror of
https://github.com/simplex-chat/simplexmq.git
synced 2026-03-30 16:26:02 +00:00
51 lines
1.3 KiB
YAML
51 lines
1.3 KiB
YAML
name: Build and push Docker image to Docker Hub
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- "v*"
|
|
|
|
jobs:
|
|
build-and-push:
|
|
name: Build and push Docker image
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
include:
|
|
- app: smp-server
|
|
app_port: "443 5223"
|
|
- app: xftp-server
|
|
app_port: 443
|
|
steps:
|
|
- name: Clone project
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Log in to Docker Hub
|
|
uses: simplex-chat/docker-login-action@v3
|
|
with:
|
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
password: ${{ secrets.DOCKERHUB_PASSWORD }}
|
|
|
|
- name: Extract metadata for Docker image
|
|
id: meta
|
|
uses: simplex-chat/docker-metadata-action@v5
|
|
with:
|
|
images: ${{ secrets.DOCKERHUB_USERNAME }}/${{ matrix.app }}
|
|
flavor: |
|
|
latest=auto
|
|
tags: |
|
|
type=semver,pattern=v{{version}}
|
|
type=semver,pattern=v{{major}}.{{minor}}
|
|
type=semver,pattern=v{{major}}
|
|
|
|
- name: Build and push Docker image
|
|
uses: simplex-chat/docker-build-push-action@v6
|
|
with:
|
|
push: true
|
|
build-args: |
|
|
APP=${{ matrix.app }}
|
|
APP_PORT=${{ matrix.app_port }}
|
|
tags: ${{ steps.meta.outputs.tags }}
|
|
labels: ${{ steps.meta.outputs.labels }}
|