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:
|
|
|
|
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:
|
2023-04-20 01:20:45 +02:00
|
|
|
- uses: actions/checkout@v3
|
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
|
2023-08-03 19:55:30 +02:00
|
|
|
name: Build & push Docker image to ghcr.io for ${{ matrix.db-type }}
|
2022-06-24 11:27:08 +02:00
|
|
|
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 }}
|
2023-08-03 19:55:30 +02:00
|
|
|
|
|
|
|
- uses: mr-smithers-excellent/docker-build-push@v6
|
|
|
|
name: Build & push Docker image to docker.io for ${{ matrix.db-type }}
|
|
|
|
with:
|
|
|
|
image: umamisoftware/umami
|
|
|
|
tags: ${{ matrix.db-type }}-${{ env.RELEASE_VERSION }}, ${{ matrix.db-type }}-latest
|
|
|
|
buildArgs: DATABASE_TYPE=${{ matrix.db-type }}
|
|
|
|
registry: docker.io
|
|
|
|
username: ${{ secrets.DOCKER_USERNAME }}
|
|
|
|
password: ${{ secrets.DOCKER_PASSWORD }}
|