umami/.github/workflows/cd.yml

31 lines
809 B
YAML
Raw Normal View History

name: Create docker images
2022-06-27 11:01:15 +02:00
on: [create]
jobs:
2022-06-27 11:01:15 +02:00
build:
name: Build, push, and deploy
2022-06-27 11:01:15 +02:00
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
runs-on: ubuntu-latest
strategy:
matrix:
db-type: [postgresql, mysql]
steps:
2022-06-24 11:27:08 +02:00
- uses: actions/checkout@v2
2022-06-27 11:01:15 +02:00
- name: Set env
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
2022-06-24 11:27:08 +02:00
- uses: mr-smithers-excellent/docker-build-push@v5
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
2022-06-24 11:27:08 +02:00
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}