2022-03-22 15:03:55 +01:00
|
|
|
name: Create docker images
|
|
|
|
|
2022-06-27 11:01:15 +02:00
|
|
|
on: [create]
|
2022-03-22 15:03:55 +01:00
|
|
|
|
|
|
|
jobs:
|
2022-06-27 11:01:15 +02:00
|
|
|
|
2022-03-22 15:03:55 +01:00
|
|
|
build:
|
|
|
|
name: Build, push, and deploy
|
2022-06-27 11:01:15 +02:00
|
|
|
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
|
2022-03-22 15:03:55 +01:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
db-type: [postgresql, mysql]
|
|
|
|
|
|
|
|
steps:
|
2022-06-24 11:27:08 +02:00
|
|
|
- uses: actions/checkout@v2
|
2022-03-22 15:03:55 +01:00
|
|
|
|
2022-06-27 11:01:15 +02:00
|
|
|
- name: Set env
|
|
|
|
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
|
|
|
|
|
2023-03-12 18:06:06 +01:00
|
|
|
- uses: mr-smithers-excellent/docker-build-push@v6
|
2022-06-24 11:27:08 +02:00
|
|
|
name: Build & push Docker image for ${{ matrix.db-type }}
|
|
|
|
with:
|
|
|
|
image: umami
|
2022-06-27 11:01:15 +02:00
|
|
|
tags: ${{ matrix.db-type }}-${{ env.RELEASE_VERSION }}, ${{ matrix.db-type }}-latest
|
2022-06-24 11:27:08 +02:00
|
|
|
buildArgs: DATABASE_TYPE=${{ matrix.db-type }}
|
2022-06-30 19:31:01 +02:00
|
|
|
registry: ghcr.io
|
2023-03-12 18:06:06 +01:00
|
|
|
multiPlatform: true
|
|
|
|
platform: linux/amd64,linux/arm64
|
2022-06-24 11:27:08 +02:00
|
|
|
username: ${{ github.actor }}
|
|
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|