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
Use GitHub Container Registry for Docker images
Hugo Müller-Downing7dd5d9727936
diff --git a/.github/workflows/main.yml b/.github/workflows/main.ymlindex aecd76dc4..bab1852da 100644--- a/.github/workflows/main.yml+++ b/.github/workflows/main.yml@@ -1,6 +1,7 @@on:- release:- types: [published]+ push:+ branches:+ - feat/push-to-github-container-registryjobs:@@ -13,17 +14,29 @@ jobs:uses: actions/checkout@v2- name: Build PostgreSQL container image- run: docker build --build-arg DATABASE_TYPE=postgresql --tag docker.pkg.github.com/mikecao/umami/umami:postgresql-$(echo $GITHUB_SHA | head -c7) .+ run: |+ docker build --build-arg DATABASE_TYPE=postgresql \+ --tag ghcr.io/$GITHUB_ACTOR/umami:postgresql-$(echo $GITHUB_SHA | head -c7) \+ --tag ghcr.io/$GITHUB_ACTOR/umami:postgresql-latest \+ .- name: Build MySQL container image- run: docker build --build-arg DATABASE_TYPE=mysql --tag docker.pkg.github.com/mikecao/umami/umami:mysql-$(echo $GITHUB_SHA | head -c7) .+ run: |+ docker build --build-arg DATABASE_TYPE=mysql \+ --tag ghcr.io/$GITHUB_ACTOR/umami:mysql-$(echo $GITHUB_SHA | head -c7) \+ --tag ghcr.io/$GITHUB_ACTOR/umami:mysql-latest \+ .- name: Docker loginenv:- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}- run: docker login -u mikecao -p $GITHUB_TOKEN docker.pkg.github.com+ CR_PAT: ${{ secrets.CR_PAT }}+ run: docker login -u $GITHUB_ACTOR -p $CR_PAT ghcr.io- name: Push image to GitHubrun: |- docker push docker.pkg.github.com/mikecao/umami/umami:postgresql-$(echo $GITHUB_SHA | head -c7)- docker push docker.pkg.github.com/mikecao/umami/umami:mysql-$(echo $GITHUB_SHA | head -c7)+ # Push each image individually, avoiding pushing to umami:latest+ # as MySQL or PostgreSQL are required+ docker push ghcr.io/$GITHUB_ACTOR/umami:postgresql-$(echo $GITHUB_SHA | head -c7)+ docker push ghcr.io/$GITHUB_ACTOR/umami:postgresql-latest+ docker push ghcr.io/$GITHUB_ACTOR/umami:mysql-$(echo $GITHUB_SHA | head -c7)+ docker push ghcr.io/$GITHUB_ACTOR/umami:mysql-latestdiff --git a/README.md b/README.mdindex 078829a6b..a241d409f 100644--- a/README.md+++ b/README.md@@ -60,13 +60,13 @@ The `HASH_SALT` is used to generate unique values for your installation.### Build the application-```+```bashnpm run build```### Start the application-```+```bashnpm start```@@ -78,15 +78,26 @@ or change the [port](https://nextjs.org/docs/api-reference/cli#production) to seTo build the umami container and start up a Postgres database, run:-```+```bashdocker-compose up```+Alternatively, to pull just the Umami Docker image with PostgreSQL support:+```bash+docker pull ghcr.io/mikecao/umami:postgresql-latest+```++Or with MySQL support:+```bash+docker pull ghcr.io/mikecao/umami:mysql-latest+```++## Getting updatesTo get the latest features, simply do a pull, install any new dependencies, and rebuild:-```+```bashgit pullnpm installnpm run build@@ -94,4 +105,4 @@ npm run build## License-MIT\ No newline at end of file+MITdiff --git a/docker-compose.yml b/docker-compose.ymlindex 7f1b42ff9..7a12e83d1 100644--- a/docker-compose.yml+++ b/docker-compose.yml@@ -2,7 +2,7 @@version: '3'services:umami:- build: .+ image: ghcr.io/mikecao/umami:postgresql-latestports:- "3000:3000"environment: