Compare commits

...

5 commits

Author SHA1 Message Date
Mike Cao
860e6390f1 Updated Docker build.
Some checks failed
Node.js CI / build (push) Has been cancelled
2025-12-11 20:16:56 -08:00
Mike Cao
9b0d1b092e Updated worfkflow. 2025-12-11 19:31:36 -08:00
Mike Cao
2a71cc721b Fixed CI build. 2025-12-11 18:25:23 -08:00
Mike Cao
7bea47d9e8 Bumped version v3.0.3. Updated workflow. 2025-12-11 18:04:10 -08:00
Mike Cao
e9cdabab5a Upgraded react and next. 2025-12-11 17:58:20 -08:00
4 changed files with 1049 additions and 1033 deletions

View file

@ -3,13 +3,18 @@ name: Create docker images
on:
push:
tags:
- 'v*.*.*'
- "v*.*.*"
workflow_dispatch:
inputs:
version:
description: 'Optional image version (e.g. 3.0.0, v3.0.0, or 3.0.0-beta.1)'
description: "Optional image version (e.g. 3.0.0, v3.0.0, or 3.0.0-beta.1)"
required: false
default: ''
default: ""
include_latest:
description: "Include latest tag"
required: false
type: boolean
default: true
jobs:
build:
@ -22,6 +27,9 @@ jobs:
steps:
- uses: actions/checkout@v5
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
@ -46,6 +54,7 @@ jobs:
INPUT="${{ github.event.inputs.version }}"
REF_TYPE="${{ github.ref_type }}"
REF_NAME="${{ github.ref_name }}"
INCLUDE_LATEST="${{ github.event.inputs.include_latest }}"
# Determine version source
if [[ -n "$INPUT" ]]; then
@ -56,7 +65,8 @@ jobs:
VERSION=""
fi
TAGS=""
GHCR_TAGS=""
DOCKER_TAGS=""
if [[ -n "$VERSION" ]]; then
MAJOR=$(echo "$VERSION" | cut -d. -f1)
@ -64,37 +74,54 @@ jobs:
if [[ "$VERSION" == *-* ]]; then
# prerelease: only version tag
TAGS="$VERSION"
GHCR_TAGS="ghcr.io/${{ github.repository }}:$VERSION"
DOCKER_TAGS="umamisoftware/umami:$VERSION"
else
# stable release: version + hierarchy + latest
TAGS="$VERSION,${MAJOR}.${MINOR},${MAJOR},postgresql-latest,latest"
# stable release: version + hierarchy
GHCR_TAGS="ghcr.io/${{ github.repository }}:$VERSION"
GHCR_TAGS="$GHCR_TAGS,ghcr.io/${{ github.repository }}:${MAJOR}.${MINOR}"
GHCR_TAGS="$GHCR_TAGS,ghcr.io/${{ github.repository }}:${MAJOR}"
GHCR_TAGS="$GHCR_TAGS,ghcr.io/${{ github.repository }}:postgresql-latest"
DOCKER_TAGS="umamisoftware/umami:$VERSION"
DOCKER_TAGS="$DOCKER_TAGS,umamisoftware/umami:${MAJOR}.${MINOR}"
DOCKER_TAGS="$DOCKER_TAGS,umamisoftware/umami:${MAJOR}"
DOCKER_TAGS="$DOCKER_TAGS,umamisoftware/umami:postgresql-latest"
# Add latest tag based on trigger and input
if [[ "$REF_TYPE" == "tag" ]] || [[ "$INCLUDE_LATEST" == "true" ]]; then
GHCR_TAGS="$GHCR_TAGS,ghcr.io/${{ github.repository }}:latest"
DOCKER_TAGS="$DOCKER_TAGS,umamisoftware/umami:latest"
fi
fi
else
# Non-tag build (e.g. from main branch)
TAGS="${REF_NAME}"
GHCR_TAGS="ghcr.io/${{ github.repository }}:${REF_NAME}"
DOCKER_TAGS="umamisoftware/umami:${REF_NAME}"
fi
echo "tags=$TAGS" >> $GITHUB_OUTPUT
echo "Computed tags: $TAGS"
echo "ghcr_tags=$GHCR_TAGS" >> $GITHUB_OUTPUT
echo "docker_tags=$DOCKER_TAGS" >> $GITHUB_OUTPUT
echo "Computed GHCR tags: $GHCR_TAGS"
echo "Computed Docker Hub tags: $DOCKER_TAGS"
- name: Build and push Docker image
run: |
TAGS="${{ steps.compute.outputs.tags }}"
- name: Build and push to GHCR
uses: docker/build-push-action@v5
with:
context: .
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.compute.outputs.ghcr_tags }}
cache-from: type=gha
cache-to: type=gha,mode=max
# Set image targets conditionally
if [[ "${{ github.repository }}" == "umami-software/umami" ]]; then
IMAGES=("umamisoftware/umami" "ghcr.io/${{ github.repository }}")
else
IMAGES=("ghcr.io/${{ github.repository }}")
fi
for IMAGE in "${IMAGES[@]}"; do
echo "Building and pushing $IMAGE with tags: $TAGS"
docker buildx build \
--platform linux/amd64,linux/arm64 \
--push \
$(echo "$TAGS" | tr ',' '\n' | sed "s|^|--tag ${IMAGE}:|") \
--cache-from type=gha \
--cache-to type=gha,mode=max \
.
done
- name: Build and push to Docker Hub
if: github.repository == 'umami-software/umami'
uses: docker/build-push-action@v5
with:
context: .
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.compute.outputs.docker_tags }}
cache-from: type=gha
cache-to: type=gha,mode=max

View file

@ -3,7 +3,7 @@ name: Node.js CI
on: [push]
env:
DATABASE_TYPE: postgresql
DATABASE_URL: "postgresql://user:pass@localhost:5432/dummy"
SKIP_DB_CHECK: 1
jobs:
@ -11,27 +11,18 @@ jobs:
if: github.repository == 'umami-software/umami'
runs-on: ubuntu-latest
strategy:
matrix:
include:
- node-version: 18.18
pnpm-version: 10
db-type: postgresql
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4 # required so that setup-node will work
with:
version: ${{ matrix.pnpm-version }}
run_install: false
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'
env:
DATABASE_TYPE: ${{ matrix.db-type }}
- run: npm install --global pnpm
- run: pnpm install
- run: pnpm test
- run: pnpm build
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
version: 10
run_install: false
- name: Use Node.js 18.18
uses: actions/setup-node@v4
with:
node-version: 18.18
cache: "pnpm"
- run: npm install --global pnpm
- run: pnpm install
- run: pnpm test
- run: pnpm build

View file

@ -1,6 +1,6 @@
{
"name": "umami",
"version": "3.0.2",
"version": "3.0.3",
"description": "A modern, privacy-focused alternative to Google Analytics.",
"author": "Umami Software, Inc. <hello@umami.is>",
"license": "MIT",
@ -102,15 +102,15 @@
"kafkajs": "^2.1.0",
"lucide-react": "^0.543.0",
"maxmind": "^5.0.0",
"next": "^15.5.7",
"next": "^15.5.9",
"node-fetch": "^3.2.8",
"npm-run-all": "^4.1.5",
"papaparse": "^5.5.3",
"pg": "^8.16.3",
"prisma": "^6.18.0",
"pure-rand": "^7.0.1",
"react": "^19.2.1",
"react-dom": "^19.2.1",
"react": "^19.2.3",
"react-dom": "^19.2.3",
"react-error-boundary": "^4.0.4",
"react-intl": "^7.1.14",
"react-simple-maps": "^2.3.0",

1948
pnpm-lock.yaml generated

File diff suppressed because it is too large Load diff