umami/.github/workflows/cd-cloud.yml
Gavin Mogan bf4e6ea96f Migrate to docker actions
Originally just wanted to add the standard opencontainer labels that
docker/metadata provide

but with "mr-smithers-excellent" seemed to only half implement docker
support, and a higher risk than docker for supply chain issues, so I
went all out and also added cosign to sign the images.

Docker metadata tags supports all the custom code to create version
tags, out of the box and fully maintained

Also dropped the manual workflow, just merged it into cd.yml since you
can select tags when you manual dispatch, and thats less to maintain
2025-09-06 07:06:23 -07:00

29 lines
757 B
YAML

name: Create docker images (cloud)
on:
push:
branches:
- analytics
- cloud
jobs:
build:
name: Build, push, and deploy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Generate random hash
id: random_hash
run: echo "hash=$(openssl rand -hex 4)" >> $GITHUB_OUTPUT
- uses: mr-smithers-excellent/docker-build-push@v6
name: Build & push Docker image to docker.io
with:
image: umamisoftware/umami
tags: cloud-${{ steps.random_hash.outputs.hash }}, cloud-latest
buildArgs: DATABASE_TYPE=postgresql
registry: docker.io
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}