mirror of
https://github.com/umami-software/umami.git
synced 2025-12-06 01:18:00 +01:00
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
29 lines
757 B
YAML
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 }}
|