From 3eb2e890efb5b18bdfbeab46b9946f48e38da424 Mon Sep 17 00:00:00 2001 From: Mike Cao Date: Thu, 11 Dec 2025 16:14:31 -0800 Subject: [PATCH 1/4] Update next --- package.json | 8 +-- pnpm-lock.yaml | 178 ++++++++++++++++++++++++------------------------- 2 files changed, 93 insertions(+), 93 deletions(-) diff --git a/package.json b/package.json index 970965f8..e684df42 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "umami", - "version": "2.20.1", + "version": "2.20.2", "description": "A modern, privacy-focused alternative to Google Analytics.", "author": "Umami Software, Inc. ", "license": "MIT", @@ -103,15 +103,15 @@ "kafkajs": "^2.1.0", "maxmind": "^4.3.24", "md5": "^2.3.0", - "next": "15.5.7", + "next": "^15.5.9", "node-fetch": "^3.2.8", "npm-run-all": "^4.1.5", "papaparse": "^5.5.3", "prisma": "6.7.0", "pure-rand": "^6.1.0", - "react": "^19.2.1", + "react": "^19.2.3", "react-basics": "^0.126.0", - "react-dom": "^19.2.1", + "react-dom": "^19.2.3", "react-error-boundary": "^4.0.4", "react-intl": "^6.5.5", "react-simple-maps": "^2.3.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 6c1a304f..bb1ee540 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -25,7 +25,7 @@ importers: version: 4.5.15 '@hello-pangea/dnd': specifier: ^17.0.0 - version: 17.0.0(@types/react@19.1.8)(react-dom@19.2.1(react@19.2.1))(react@19.2.1) + version: 17.0.0(@types/react@19.1.8)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) '@prisma/client': specifier: 6.7.0 version: 6.7.0(prisma@6.7.0(typescript@5.8.3))(typescript@5.8.3) @@ -34,10 +34,10 @@ importers: version: 0.4.1(@prisma/client@6.7.0(prisma@6.7.0(typescript@5.8.3))(typescript@5.8.3)) '@react-spring/web': specifier: ^9.7.3 - version: 9.7.5(react-dom@19.2.1(react@19.2.1))(react@19.2.1) + version: 9.7.5(react-dom@19.2.3(react@19.2.3))(react@19.2.3) '@tanstack/react-query': specifier: ^5.28.6 - version: 5.83.0(react@19.2.1) + version: 5.83.0(react@19.2.3) '@umami/redis-client': specifier: ^0.26.0 version: 0.26.0 @@ -123,8 +123,8 @@ importers: specifier: ^2.3.0 version: 2.3.0 next: - specifier: 15.5.7 - version: 15.5.7(@babel/core@7.28.0)(react-dom@19.2.1(react@19.2.1))(react@19.2.1) + specifier: ^15.5.9 + version: 15.5.9(@babel/core@7.28.0)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) node-fetch: specifier: ^3.2.8 version: 3.3.2 @@ -141,29 +141,29 @@ importers: specifier: ^6.1.0 version: 6.1.0 react: - specifier: ^19.2.1 - version: 19.2.1 + specifier: ^19.2.3 + version: 19.2.3 react-basics: specifier: ^0.126.0 - version: 0.126.0(react-dom@19.2.1(react@19.2.1))(react@19.2.1) + version: 0.126.0(react-dom@19.2.3(react@19.2.3))(react@19.2.3) react-dom: - specifier: ^19.2.1 - version: 19.2.1(react@19.2.1) + specifier: ^19.2.3 + version: 19.2.3(react@19.2.3) react-error-boundary: specifier: ^4.0.4 - version: 4.1.2(react@19.2.1) + version: 4.1.2(react@19.2.3) react-intl: specifier: ^6.5.5 - version: 6.8.9(react@19.2.1)(typescript@5.8.3) + version: 6.8.9(react@19.2.3)(typescript@5.8.3) react-simple-maps: specifier: ^2.3.0 - version: 2.3.0(prop-types@15.8.1)(react-dom@19.2.1(react@19.2.1))(react@19.2.1) + version: 2.3.0(prop-types@15.8.1)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) react-use-measure: specifier: ^2.0.4 - version: 2.1.7(react-dom@19.2.1(react@19.2.1))(react@19.2.1) + version: 2.1.7(react-dom@19.2.3(react@19.2.3))(react@19.2.3) react-window: specifier: ^1.8.6 - version: 1.8.11(react-dom@19.2.1(react@19.2.1))(react@19.2.1) + version: 1.8.11(react-dom@19.2.3(react@19.2.3))(react@19.2.3) request-ip: specifier: ^3.3.0 version: 3.3.0 @@ -184,7 +184,7 @@ importers: version: 3.25.76 zustand: specifier: ^4.5.5 - version: 4.5.7(@types/react@19.1.8)(immer@9.0.21)(react@19.2.1) + version: 4.5.7(@types/react@19.1.8)(immer@9.0.21)(react@19.2.3) devDependencies: '@formatjs/cli': specifier: ^4.2.29 @@ -1826,8 +1826,8 @@ packages: resolution: {integrity: sha512-F+HiQaUpISBmooALpwDULoCCwUhI6MugEEBstjuxOL2rh2ROFhK4abv87f4GxVXRSmw0AtXAp2eiP8vHcZ3NKQ==} engines: {node: '>=18.0.0'} - '@next/env@15.5.7': - resolution: {integrity: sha512-4h6Y2NyEkIEN7Z8YxkA27pq6zTkS09bUSYC0xjd0NpwFxjnIKeZEeH591o5WECSmjpUhLn3H2QLJcDye3Uzcvg==} + '@next/env@15.5.9': + resolution: {integrity: sha512-4GlTZ+EJM7WaW2HEZcyU317tIQDjkQIyENDLxYJfSWlfqguN+dHkZgyQTV/7ykvobU7yEH5gKvreNrH4B6QgIg==} '@next/eslint-plugin-next@14.2.30': resolution: {integrity: sha512-mvVsMIutMxQ4NGZEMZ1kiBNc+la8Xmlk30bKUmCPQz2eFkmsLv54Mha8QZarMaCtSPkkFA1TMD+FIZk0l/PpzA==} @@ -4933,8 +4933,8 @@ packages: natural-compare@1.4.0: resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==} - next@15.5.7: - resolution: {integrity: sha512-+t2/0jIJ48kUpGKkdlhgkv+zPTEOoXyr60qXe68eB/pl3CMJaLeIGjzp5D6Oqt25hCBiBTt8wEeeAzfJvUKnPQ==} + next@15.5.9: + resolution: {integrity: sha512-agNLK89seZEtC5zUHwtut0+tNrc0Xw4FT/Dg+B/VLEo9pAcS9rtTKpek3V6kVcVwsB2YlqMaHdfZL4eLEVYuCg==} engines: {node: ^18.18.0 || ^19.8.0 || >= 20.0.0} hasBin: true peerDependencies: @@ -5708,10 +5708,10 @@ packages: react: ^18.2.0 react-dom: ^18.2.0 - react-dom@19.2.1: - resolution: {integrity: sha512-ibrK8llX2a4eOskq1mXKu/TGZj9qzomO+sNfO98M6d9zIPOEhlBkMkBUBLd1vgS0gQsLDBzA+8jJBVXDnfHmJg==} + react-dom@19.2.3: + resolution: {integrity: sha512-yELu4WmLPw5Mr/lmeEpox5rw3RETacE++JgHqQzd2dg+YbJuat3jH4ingc+WPZhxaoFzdv9y33G+F7Nl5O0GBg==} peerDependencies: - react: ^19.2.1 + react: ^19.2.3 react-error-boundary@4.1.2: resolution: {integrity: sha512-GQDxZ5Jd+Aq/qUxbCm1UtzmL/s++V7zKgE8yMktJiCQXCCFZnMZh9ng+6/Ne6PjNSXH0L9CjeOEREfRnq6Duag==} @@ -5774,8 +5774,8 @@ packages: react: ^15.0.0 || ^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 react-dom: ^15.0.0 || ^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 - react@19.2.1: - resolution: {integrity: sha512-DGrYcCWK7tvYMnWh79yrPHt+vdx9tY+1gPZa7nJQtO/p8bLTDaHp4dzwEhQB7pZ4Xe3ok4XKuEPrVuc+wlpkmw==} + react@19.2.3: + resolution: {integrity: sha512-Ku/hhYbVjOQnXDZFv2+RibmLFGwFdeeKHFcOTlrt7xplBnya5OGn/hIRDsqDiSUcfORsDC7MPxwork8jBwsIWA==} engines: {node: '>=0.10.0'} read-babelrc-up@1.1.0: @@ -8108,17 +8108,17 @@ snapshots: optionalDependencies: ts-jest: 29.4.0(@babel/core@7.28.0)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.28.0))(esbuild@0.25.8)(jest-util@29.7.0)(jest@29.7.0(@types/node@22.16.5)(ts-node@10.9.2(@types/node@22.16.5)(typescript@5.8.3)))(typescript@5.8.3) - '@hello-pangea/dnd@17.0.0(@types/react@19.1.8)(react-dom@19.2.1(react@19.2.1))(react@19.2.1)': + '@hello-pangea/dnd@17.0.0(@types/react@19.1.8)(react-dom@19.2.3(react@19.2.3))(react@19.2.3)': dependencies: '@babel/runtime': 7.27.6 css-box-model: 1.2.1 memoize-one: 6.0.0 raf-schd: 4.0.3 - react: 19.2.1 - react-dom: 19.2.1(react@19.2.1) - react-redux: 9.2.0(@types/react@19.1.8)(react@19.2.1)(redux@5.0.1) + react: 19.2.3 + react-dom: 19.2.3(react@19.2.3) + react-redux: 9.2.0(@types/react@19.1.8)(react@19.2.3)(redux@5.0.1) redux: 5.0.1 - use-memo-one: 1.1.3(react@19.2.1) + use-memo-one: 1.1.3(react@19.2.3) transitivePeerDependencies: - '@types/react' @@ -8442,7 +8442,7 @@ snapshots: '@netlify/plugin-nextjs@5.11.6': {} - '@next/env@15.5.7': {} + '@next/env@15.5.9': {} '@next/eslint-plugin-next@14.2.30': dependencies: @@ -8526,37 +8526,37 @@ snapshots: dependencies: '@prisma/debug': 6.7.0 - '@react-spring/animated@9.7.5(react@19.2.1)': + '@react-spring/animated@9.7.5(react@19.2.3)': dependencies: - '@react-spring/shared': 9.7.5(react@19.2.1) + '@react-spring/shared': 9.7.5(react@19.2.3) '@react-spring/types': 9.7.5 - react: 19.2.1 + react: 19.2.3 - '@react-spring/core@9.7.5(react@19.2.1)': + '@react-spring/core@9.7.5(react@19.2.3)': dependencies: - '@react-spring/animated': 9.7.5(react@19.2.1) - '@react-spring/shared': 9.7.5(react@19.2.1) + '@react-spring/animated': 9.7.5(react@19.2.3) + '@react-spring/shared': 9.7.5(react@19.2.3) '@react-spring/types': 9.7.5 - react: 19.2.1 + react: 19.2.3 '@react-spring/rafz@9.7.5': {} - '@react-spring/shared@9.7.5(react@19.2.1)': + '@react-spring/shared@9.7.5(react@19.2.3)': dependencies: '@react-spring/rafz': 9.7.5 '@react-spring/types': 9.7.5 - react: 19.2.1 + react: 19.2.3 '@react-spring/types@9.7.5': {} - '@react-spring/web@9.7.5(react-dom@19.2.1(react@19.2.1))(react@19.2.1)': + '@react-spring/web@9.7.5(react-dom@19.2.3(react@19.2.3))(react@19.2.3)': dependencies: - '@react-spring/animated': 9.7.5(react@19.2.1) - '@react-spring/core': 9.7.5(react@19.2.1) - '@react-spring/shared': 9.7.5(react@19.2.1) + '@react-spring/animated': 9.7.5(react@19.2.3) + '@react-spring/core': 9.7.5(react@19.2.3) + '@react-spring/shared': 9.7.5(react@19.2.3) '@react-spring/types': 9.7.5 - react: 19.2.1 - react-dom: 19.2.1(react@19.2.1) + react: 19.2.3 + react-dom: 19.2.3(react@19.2.3) '@redis/bloom@1.2.0(@redis/client@1.6.1)': dependencies: @@ -8767,10 +8767,10 @@ snapshots: '@tanstack/query-core@5.83.0': {} - '@tanstack/react-query@5.83.0(react@19.2.1)': + '@tanstack/react-query@5.83.0(react@19.2.3)': dependencies: '@tanstack/query-core': 5.83.0 - react: 19.2.1 + react: 19.2.3 '@trysound/sax@0.2.0': {} @@ -12070,15 +12070,15 @@ snapshots: natural-compare@1.4.0: {} - next@15.5.7(@babel/core@7.28.0)(react-dom@19.2.1(react@19.2.1))(react@19.2.1): + next@15.5.9(@babel/core@7.28.0)(react-dom@19.2.3(react@19.2.3))(react@19.2.3): dependencies: - '@next/env': 15.5.7 + '@next/env': 15.5.9 '@swc/helpers': 0.5.15 caniuse-lite: 1.0.30001727 postcss: 8.4.31 - react: 19.2.1 - react-dom: 19.2.1(react@19.2.1) - styled-jsx: 5.1.6(@babel/core@7.28.0)(react@19.2.1) + react: 19.2.3 + react-dom: 19.2.3(react@19.2.3) + styled-jsx: 5.1.6(@babel/core@7.28.0)(react@19.2.3) optionalDependencies: '@next/swc-darwin-arm64': 15.5.7 '@next/swc-darwin-x64': 15.5.7 @@ -12822,31 +12822,31 @@ snapshots: dependencies: safe-buffer: 5.2.1 - react-basics@0.126.0(react-dom@19.2.1(react@19.2.1))(react@19.2.1): + react-basics@0.126.0(react-dom@19.2.3(react@19.2.3))(react@19.2.3): dependencies: - '@react-spring/web': 9.7.5(react-dom@19.2.1(react@19.2.1))(react@19.2.1) + '@react-spring/web': 9.7.5(react-dom@19.2.3(react@19.2.3))(react@19.2.3) classnames: 2.5.1 date-fns: 2.30.0 - react: 19.2.1 - react-dom: 19.2.1(react@19.2.1) - react-hook-form: 7.60.0(react@19.2.1) - react-window: 1.8.11(react-dom@19.2.1(react@19.2.1))(react@19.2.1) + react: 19.2.3 + react-dom: 19.2.3(react@19.2.3) + react-hook-form: 7.60.0(react@19.2.3) + react-window: 1.8.11(react-dom@19.2.3(react@19.2.3))(react@19.2.3) - react-dom@19.2.1(react@19.2.1): + react-dom@19.2.3(react@19.2.3): dependencies: - react: 19.2.1 + react: 19.2.3 scheduler: 0.27.0 - react-error-boundary@4.1.2(react@19.2.1): + react-error-boundary@4.1.2(react@19.2.3): dependencies: '@babel/runtime': 7.27.6 - react: 19.2.1 + react: 19.2.3 - react-hook-form@7.60.0(react@19.2.1): + react-hook-form@7.60.0(react@19.2.3): dependencies: - react: 19.2.1 + react: 19.2.3 - react-intl@6.8.9(react@19.2.1)(typescript@5.8.3): + react-intl@6.8.9(react@19.2.3)(typescript@5.8.3): dependencies: '@formatjs/ecma402-abstract': 2.2.4 '@formatjs/icu-messageformat-parser': 2.9.4 @@ -12857,7 +12857,7 @@ snapshots: '@types/react': 18.3.23 hoist-non-react-statics: 3.3.2 intl-messageformat: 10.7.7 - react: 19.2.1 + react: 19.2.3 tslib: 2.8.1 optionalDependencies: typescript: 5.8.3 @@ -12866,39 +12866,39 @@ snapshots: react-is@18.3.1: {} - react-redux@9.2.0(@types/react@19.1.8)(react@19.2.1)(redux@5.0.1): + react-redux@9.2.0(@types/react@19.1.8)(react@19.2.3)(redux@5.0.1): dependencies: '@types/use-sync-external-store': 0.0.6 - react: 19.2.1 - use-sync-external-store: 1.5.0(react@19.2.1) + react: 19.2.3 + use-sync-external-store: 1.5.0(react@19.2.3) optionalDependencies: '@types/react': 19.1.8 redux: 5.0.1 - react-simple-maps@2.3.0(prop-types@15.8.1)(react-dom@19.2.1(react@19.2.1))(react@19.2.1): + react-simple-maps@2.3.0(prop-types@15.8.1)(react-dom@19.2.3(react@19.2.3))(react@19.2.3): dependencies: d3-geo: 2.0.2 d3-selection: 2.0.0 d3-zoom: 2.0.0 prop-types: 15.8.1 - react: 19.2.1 - react-dom: 19.2.1(react@19.2.1) + react: 19.2.3 + react-dom: 19.2.3(react@19.2.3) topojson-client: 3.1.0 - react-use-measure@2.1.7(react-dom@19.2.1(react@19.2.1))(react@19.2.1): + react-use-measure@2.1.7(react-dom@19.2.3(react@19.2.3))(react@19.2.3): dependencies: - react: 19.2.1 + react: 19.2.3 optionalDependencies: - react-dom: 19.2.1(react@19.2.1) + react-dom: 19.2.3(react@19.2.3) - react-window@1.8.11(react-dom@19.2.1(react@19.2.1))(react@19.2.1): + react-window@1.8.11(react-dom@19.2.3(react@19.2.3))(react@19.2.3): dependencies: '@babel/runtime': 7.27.6 memoize-one: 5.2.1 - react: 19.2.1 - react-dom: 19.2.1(react@19.2.1) + react: 19.2.3 + react-dom: 19.2.3(react@19.2.3) - react@19.2.1: {} + react@19.2.3: {} read-babelrc-up@1.1.0: dependencies: @@ -13490,10 +13490,10 @@ snapshots: style-search@0.1.0: {} - styled-jsx@5.1.6(@babel/core@7.28.0)(react@19.2.1): + styled-jsx@5.1.6(@babel/core@7.28.0)(react@19.2.3): dependencies: client-only: 0.0.1 - react: 19.2.1 + react: 19.2.3 optionalDependencies: '@babel/core': 7.28.0 @@ -13880,13 +13880,13 @@ snapshots: dependencies: punycode: 2.3.1 - use-memo-one@1.1.3(react@19.2.1): + use-memo-one@1.1.3(react@19.2.3): dependencies: - react: 19.2.1 + react: 19.2.3 - use-sync-external-store@1.5.0(react@19.2.1): + use-sync-external-store@1.5.0(react@19.2.3): dependencies: - react: 19.2.1 + react: 19.2.3 util-deprecate@1.0.2: {} @@ -14068,10 +14068,10 @@ snapshots: zod@3.25.76: {} - zustand@4.5.7(@types/react@19.1.8)(immer@9.0.21)(react@19.2.1): + zustand@4.5.7(@types/react@19.1.8)(immer@9.0.21)(react@19.2.3): dependencies: - use-sync-external-store: 1.5.0(react@19.2.1) + use-sync-external-store: 1.5.0(react@19.2.3) optionalDependencies: '@types/react': 19.1.8 immer: 9.0.21 - react: 19.2.1 + react: 19.2.3 From 7729bbf4a7399ab6b7fbd67e5b72827a6bfcbcc4 Mon Sep 17 00:00:00 2001 From: Mike Cao Date: Thu, 11 Dec 2025 16:41:23 -0800 Subject: [PATCH 2/4] Updated workflows. --- .github/workflows/cd-manual.yml | 58 --------------------------------- .github/workflows/cd.yml | 51 ++++++++++++++++++++++++----- .github/workflows/ci.yml | 15 ++++++--- 3 files changed, 53 insertions(+), 71 deletions(-) delete mode 100644 .github/workflows/cd-manual.yml diff --git a/.github/workflows/cd-manual.yml b/.github/workflows/cd-manual.yml deleted file mode 100644 index 1f8651fa..00000000 --- a/.github/workflows/cd-manual.yml +++ /dev/null @@ -1,58 +0,0 @@ -name: Create docker images (manual) - -on: - workflow_dispatch: - inputs: - version: - type: string - description: Version - required: true - -jobs: - build: - name: Build, push, and deploy - runs-on: ubuntu-latest - - strategy: - matrix: - db-type: [postgresql, mysql] - - steps: - - uses: actions/checkout@v3 - - - name: Extract version parts from input - id: extract_version - run: | - echo "version=$(echo ${{ github.event.inputs.version }})" >> $GITHUB_ENV - echo "major=$(echo ${{ github.event.inputs.version }} | cut -d. -f1)" >> $GITHUB_ENV - echo "minor=$(echo ${{ github.event.inputs.version }} | cut -d. -f2)" >> $GITHUB_ENV - - - name: Generate tags - id: generate_tags - run: | - echo "tag_major=$(echo ${{ matrix.db-type }}-${{ env.major }})" >> $GITHUB_ENV - echo "tag_minor=$(echo ${{ matrix.db-type }}-${{ env.major }}.${{ env.minor }})" >> $GITHUB_ENV - echo "tag_patch=$(echo ${{ matrix.db-type }}-${{ env.version }})" >> $GITHUB_ENV - echo "tag_latest=$(echo ${{ matrix.db-type }}-latest)" >> $GITHUB_ENV - - - uses: mr-smithers-excellent/docker-build-push@v6 - name: Build & push Docker image to ghcr.io for ${{ matrix.db-type }} - with: - image: umami - tags: ${{ env.tag_major }}, ${{ env.tag_minor }}, ${{ env.tag_patch }}, ${{ env.tag_latest }} - buildArgs: DATABASE_TYPE=${{ matrix.db-type }} - registry: ghcr.io - multiPlatform: true - platform: linux/amd64,linux/arm64 - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - - - uses: mr-smithers-excellent/docker-build-push@v6 - name: Build & push Docker image to docker.io for ${{ matrix.db-type }} - with: - image: umamisoftware/umami - tags: ${{ env.tag_major }}, ${{ env.tag_minor }}, ${{ env.tag_patch }}, ${{ env.tag_latest }} - buildArgs: DATABASE_TYPE=${{ matrix.db-type }} - registry: docker.io - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} \ No newline at end of file diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 24378da8..0fa66079 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -1,11 +1,18 @@ name: Create docker images -on: [create] +on: + create: + workflow_dispatch: + inputs: + tag: + description: 'Tag to build (e.g., v2.10.0, 2.10.0, v2.10, v2)' + required: true + type: string jobs: build: name: Build, push, and deploy - if: ${{ startsWith(github.ref, 'refs/tags/v') }} + if: ${{ startsWith(github.ref, 'refs/tags/v') || github.event_name == 'workflow_dispatch' }} runs-on: ubuntu-latest strategy: @@ -14,6 +21,8 @@ jobs: steps: - uses: actions/checkout@v3 + with: + ref: ${{ github.event_name == 'workflow_dispatch' && inputs.tag || github.ref }} - name: Set env run: | @@ -22,15 +31,41 @@ jobs: - name: Generate tags id: generate_tags run: | - echo "tag_patch=$(echo ${{ matrix.db-type }})-${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV - echo "tag_minor=$(echo ${{ matrix.db-type }})-$(echo ${GITHUB_REF#refs/tags/} | cut -d. -f1,2)" >> $GITHUB_ENV - echo "tag_major=$(echo ${{ matrix.db-type }})-$(echo ${GITHUB_REF#refs/tags/} | cut -d. -f1)" >> $GITHUB_ENV + if [ "${{ github.event_name }}" == "workflow_dispatch" ]; then + TAG=${{ inputs.tag }} + else + TAG=${GITHUB_REF#refs/tags/} + fi + + # Remove 'v' prefix if present + VERSION=${TAG#v} + + # Split version into parts + IFS='.' read -ra PARTS <<< "$VERSION" + + # Generate tags based on number of version parts + if [ ${#PARTS[@]} -eq 1 ]; then + # Only major version (e.g., v2 or 2) + echo "tag_major=$(echo ${{ matrix.db-type }})-${PARTS[0]}" >> $GITHUB_ENV + echo "TAGS=${{ matrix.db-type }}-${PARTS[0]}" >> $GITHUB_ENV + elif [ ${#PARTS[@]} -eq 2 ]; then + # Major.minor version (e.g., v2.10 or 2.10) + echo "tag_major=$(echo ${{ matrix.db-type }})-${PARTS[0]}" >> $GITHUB_ENV + echo "tag_minor=$(echo ${{ matrix.db-type }})-${PARTS[0]}.${PARTS[1]}" >> $GITHUB_ENV + echo "TAGS=${{ matrix.db-type }}-${PARTS[0]}, ${{ matrix.db-type }}-${PARTS[0]}.${PARTS[1]}" >> $GITHUB_ENV + else + # Full version (e.g., v2.10.0 or 2.10.0) + echo "tag_major=$(echo ${{ matrix.db-type }})-${PARTS[0]}" >> $GITHUB_ENV + echo "tag_minor=$(echo ${{ matrix.db-type }})-${PARTS[0]}.${PARTS[1]}" >> $GITHUB_ENV + echo "tag_patch=$(echo ${{ matrix.db-type }})-${VERSION}" >> $GITHUB_ENV + echo "TAGS=${{ matrix.db-type }}-${PARTS[0]}, ${{ matrix.db-type }}-${PARTS[0]}.${PARTS[1]}, ${{ matrix.db-type }}-${VERSION}" >> $GITHUB_ENV + fi - uses: mr-smithers-excellent/docker-build-push@v6 name: Build & push Docker image to ghcr.io for ${{ matrix.db-type }} with: image: umami - tags: ${{ env.tag_major }}, ${{ env.tag_minor }}, ${{ env.tag_patch }} + tags: ${{ env.TAGS }} buildArgs: DATABASE_TYPE=${{ matrix.db-type }} registry: ghcr.io multiPlatform: true @@ -42,8 +77,8 @@ jobs: name: Build & push Docker image to docker.io for ${{ matrix.db-type }} with: image: umamisoftware/umami - tags: ${{ env.tag_major }}, ${{ env.tag_minor }}, ${{ env.tag_patch }} + tags: ${{ env.TAGS }} buildArgs: DATABASE_TYPE=${{ matrix.db-type }} registry: docker.io username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} + password: ${{ secrets.DOCKER_PASSWORD }} \ No newline at end of file diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 835407b4..eceb7ca8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -25,14 +25,19 @@ jobs: steps: - uses: actions/checkout@v4 + + - uses: pnpm/action-setup@v2 + with: + version: 8 + - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v4 with: node-version: ${{ matrix.node-version }} - cache: 'yarn' + cache: 'pnpm' env: DATABASE_TYPE: ${{ matrix.db-type }} - - run: npm install --global yarn - - run: yarn install - - run: yarn test - - run: yarn build + + - run: pnpm install + - run: pnpm test + - run: pnpm build \ No newline at end of file From ba707451df817fd8e57e87533fc17e7808029e10 Mon Sep 17 00:00:00 2001 From: Mike Cao Date: Thu, 11 Dec 2025 16:54:56 -0800 Subject: [PATCH 3/4] Updated workflows for ARM. --- .github/workflows/cd-cloud.yml | 2 +- .github/workflows/cd.yml | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/cd-cloud.yml b/.github/workflows/cd-cloud.yml index b155624a..90a09dab 100644 --- a/.github/workflows/cd-cloud.yml +++ b/.github/workflows/cd-cloud.yml @@ -1,4 +1,4 @@ -name: Create docker images +name: Create docker images (cloud) on: push: diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 0fa66079..ca04f7b0 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -24,6 +24,12 @@ jobs: with: ref: ${{ github.event_name == 'workflow_dispatch' && inputs.tag || github.ref }} + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: Set env run: | echo "NOW=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> $GITHUB_ENV From 401822582d882278350cd08c63c02dd46da384ac Mon Sep 17 00:00:00 2001 From: Mike Cao Date: Thu, 11 Dec 2025 17:00:22 -0800 Subject: [PATCH 4/4] Fixed version tags. --- .github/workflows/cd.yml | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index ca04f7b0..ec1fb3e5 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -5,7 +5,7 @@ on: workflow_dispatch: inputs: tag: - description: 'Tag to build (e.g., v2.10.0, 2.10.0, v2.10, v2)' + description: 'Tag to build (e.g., v2.10.0, v2.10, v2)' required: true type: string @@ -43,28 +43,27 @@ jobs: TAG=${GITHUB_REF#refs/tags/} fi - # Remove 'v' prefix if present + # Ensure tag starts with 'v' + if [[ ! $TAG =~ ^v ]]; then + TAG="v${TAG}" + fi + + # Remove 'v' prefix for splitting VERSION=${TAG#v} # Split version into parts IFS='.' read -ra PARTS <<< "$VERSION" - # Generate tags based on number of version parts + # Generate tags based on number of version parts (keeping 'v' prefix) if [ ${#PARTS[@]} -eq 1 ]; then - # Only major version (e.g., v2 or 2) - echo "tag_major=$(echo ${{ matrix.db-type }})-${PARTS[0]}" >> $GITHUB_ENV - echo "TAGS=${{ matrix.db-type }}-${PARTS[0]}" >> $GITHUB_ENV + # Only major version (e.g., v2) + echo "TAGS=${{ matrix.db-type }}-v${PARTS[0]}" >> $GITHUB_ENV elif [ ${#PARTS[@]} -eq 2 ]; then - # Major.minor version (e.g., v2.10 or 2.10) - echo "tag_major=$(echo ${{ matrix.db-type }})-${PARTS[0]}" >> $GITHUB_ENV - echo "tag_minor=$(echo ${{ matrix.db-type }})-${PARTS[0]}.${PARTS[1]}" >> $GITHUB_ENV - echo "TAGS=${{ matrix.db-type }}-${PARTS[0]}, ${{ matrix.db-type }}-${PARTS[0]}.${PARTS[1]}" >> $GITHUB_ENV + # Major.minor version (e.g., v2.10) + echo "TAGS=${{ matrix.db-type }}-v${PARTS[0]}, ${{ matrix.db-type }}-v${PARTS[0]}.${PARTS[1]}" >> $GITHUB_ENV else - # Full version (e.g., v2.10.0 or 2.10.0) - echo "tag_major=$(echo ${{ matrix.db-type }})-${PARTS[0]}" >> $GITHUB_ENV - echo "tag_minor=$(echo ${{ matrix.db-type }})-${PARTS[0]}.${PARTS[1]}" >> $GITHUB_ENV - echo "tag_patch=$(echo ${{ matrix.db-type }})-${VERSION}" >> $GITHUB_ENV - echo "TAGS=${{ matrix.db-type }}-${PARTS[0]}, ${{ matrix.db-type }}-${PARTS[0]}.${PARTS[1]}, ${{ matrix.db-type }}-${VERSION}" >> $GITHUB_ENV + # Full version (e.g., v2.10.0) + echo "TAGS=${{ matrix.db-type }}-v${PARTS[0]}, ${{ matrix.db-type }}-v${PARTS[0]}.${PARTS[1]}, ${{ matrix.db-type }}-v${VERSION}" >> $GITHUB_ENV fi - uses: mr-smithers-excellent/docker-build-push@v6