Umami is a privacy-first web and product analytics platform. Traffic, campaigns, behavior, conversions, and revenue in one place. No cookies, no surveillance, self-hosted or in the cloud.
TypeScript analyticsaudience-segmentationchartscohort-analysisgoogle-analyticsproduct-analyticsstatisticsuser-journeyweb-analytics
Updated workflow to only run on tag publish.
Mike Cao35c27589b711
diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.ymlindex 051d24a22..a02e9900c 100644--- a/.github/workflows/cd.yml+++ b/.github/workflows/cd.yml@@ -2,17 +2,8 @@ name: Create docker imageson:push:- branches:- - master- - main- - dev- # Publish semver tags as releases.- tags: [ 'v*.*.*' ]- pull_request:- branches:- - master- - main- - dev+ tags:+ - 'v*.*.*'workflow_dispatch:jobs:@@ -22,36 +13,31 @@ jobs:permissions:contents: readpackages: write- # This is used to complete the identity challenge- # with sigstore/fulcio when running outside of PRs.id-token: writestrategy:matrix:- db-type: [postgresql, mysql]+ db-type: [postgresql]steps:- uses: actions/checkout@v5- # Install the cosign tool except on PR- # https://github.com/sigstore/cosign-installer+ # Install cosign (for image signing)- name: Install cosign- if: github.event_name != 'pull_request'uses: sigstore/cosign-installer@v3- name: Set up Docker Buildxuses: docker/setup-buildx-action@v3- - name: Log into registry docker.io- if: github.event_name != 'pull_request' && github.repository == 'umami-software/umami'+ - name: Log into Docker Hub+ if: github.repository == 'umami-software/umami'uses: docker/login-action@v3with:registry: docker.iousername: ${{ secrets.DOCKER_USERNAME }}password: ${{ secrets.DOCKER_PASSWORD }}- - name: Log into ghcr registry- if: github.event_name != 'pull_request'+ - name: Log into GHCRuses: docker/login-action@v3with:registry: ghcr.io@@ -69,14 +55,8 @@ jobs:latest=autoprefix=${{ matrix.db-type }}-tags: |- type=ref,event=branch- type=ref,event=pr-- # output 1.1.2type=semver,pattern={{version}}- # output 1.1type=semver,pattern={{major}}.{{minor}}- # output 1type=semver,pattern={{major}}- name: Build and push Docker image@@ -86,15 +66,14 @@ jobs:context: .platforms: linux/amd64,linux/arm64build-args: DATABASE_TYPE=${{ matrix.db-type }}- push: ${{ github.event_name != 'pull_request' }}+ push: truetags: ${{ steps.meta.outputs.tags }}labels: ${{ steps.meta.outputs.labels }}cache-from: type=ghacache-to: type=gha,mode=max- # Sign the resulting Docker image digest except on PRs.+ # Sign the published image digest- name: Sign the published Docker image- if: ${{ github.event_name != 'pull_request' }}env:TAGS: ${{ steps.meta.outputs.tags }}DIGEST: ${{ steps.build-and-push.outputs.digest }}