Skip to content

Commit a857bd4

Browse files
committed
fix(readme): minor readme conflict
2 parents 1c654f1 + 46d3243 commit a857bd4

1,304 files changed

Lines changed: 113545 additions & 39673 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.dockerignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,6 @@ Dockerfile
44
.gitignore
55
.DS_Store
66
node_modules
7-
.idea
7+
.idea
8+
.env
9+
.env.*

.eslintignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/src/generated/

.eslintrc.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@
4242
"@typescript-eslint/no-var-requires": "off",
4343
"@typescript-eslint/no-empty-interface": "off",
4444
"@typescript-eslint/no-unused-vars": ["error", { "ignoreRestSiblings": true }],
45-
"@typescript-eslint/no-namespace": ["error", { "allowDeclarations": true }]
45+
"@typescript-eslint/no-namespace": ["error", { "allowDeclarations": true }],
46+
"@typescript-eslint/triple-slash-reference": "off"
4647
},
4748
"globals": {
4849
"React": "writable"

.github/ISSUE_TEMPLATE/1.bug_report.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ body:
2525
- type: input
2626
attributes:
2727
label: Which Umami version are you using? (if relevant)
28-
description: 'For example: Chrome, Edge, Firefox, etc'
28+
description: 'For example: 2.18.0, 2.15.1, 1.39.0, etc'
2929
- type: input
3030
attributes:
3131
label: Which browser are you using? (if relevant)

.github/workflows/cd-cloud.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Create docker images
1+
name: Create docker images (cloud)
22

33
on:
44
push:

.github/workflows/cd-manual.yml

Lines changed: 0 additions & 58 deletions
This file was deleted.

.github/workflows/cd.yml

Lines changed: 81 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,100 @@
11
name: Create docker images
22

3-
on: [create]
3+
on:
4+
push:
5+
tags:
6+
- 'v*.*.*'
7+
workflow_dispatch:
8+
inputs:
9+
version:
10+
description: 'Optional image version (e.g. 3.0.0, v3.0.0, or 3.0.0-beta.1)'
11+
required: false
12+
default: ''
413

514
jobs:
615
build:
716
name: Build, push, and deploy
8-
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
917
runs-on: ubuntu-latest
10-
11-
strategy:
12-
matrix:
13-
db-type: [postgresql, mysql]
18+
permissions:
19+
contents: read
20+
packages: write
1421

1522
steps:
16-
- uses: actions/checkout@v3
23+
- uses: actions/checkout@v5
1724

18-
- name: Set env
19-
run: |
20-
echo "NOW=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> $GITHUB_ENV
21-
22-
- name: Generate tags
23-
id: generate_tags
24-
run: |
25-
echo "tag_patch=$(echo ${{ matrix.db-type }})-${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
26-
echo "tag_minor=$(echo ${{ matrix.db-type }})-$(echo ${GITHUB_REF#refs/tags/} | cut -d. -f1,2)" >> $GITHUB_ENV
27-
echo "tag_major=$(echo ${{ matrix.db-type }})-$(echo ${GITHUB_REF#refs/tags/} | cut -d. -f1)" >> $GITHUB_ENV
28-
echo "tag_latest=$(echo ${{ matrix.db-type }})-latest" >> $GITHUB_ENV
25+
- name: Set up Docker Buildx
26+
uses: docker/setup-buildx-action@v3
2927

30-
- uses: mr-smithers-excellent/docker-build-push@v6
31-
name: Build & push Docker image to ghcr.io for ${{ matrix.db-type }}
28+
- name: Log into GHCR
29+
uses: docker/login-action@v3
3230
with:
33-
image: umami
34-
tags: ${{ env.tag_major }}, ${{ env.tag_minor }}, ${{ env.tag_patch }}, ${{ env.tag_latest }}
35-
buildArgs: DATABASE_TYPE=${{ matrix.db-type }}
3631
registry: ghcr.io
37-
multiPlatform: true
38-
platform: linux/amd64,linux/arm64
3932
username: ${{ github.actor }}
4033
password: ${{ secrets.GITHUB_TOKEN }}
4134

42-
- uses: mr-smithers-excellent/docker-build-push@v6
43-
name: Build & push Docker image to docker.io for ${{ matrix.db-type }}
35+
- name: Log into Docker Hub
36+
if: github.repository == 'umami-software/umami'
37+
uses: docker/login-action@v3
4438
with:
45-
image: umamisoftware/umami
46-
tags: ${{ env.tag_major }}, ${{ env.tag_minor }}, ${{ env.tag_patch }}, ${{ env.tag_latest }}
47-
buildArgs: DATABASE_TYPE=${{ matrix.db-type }}
4839
registry: docker.io
4940
username: ${{ secrets.DOCKER_USERNAME }}
50-
password: ${{ secrets.DOCKER_PASSWORD }}
41+
password: ${{ secrets.DOCKER_PASSWORD }}
42+
43+
- name: Compute version tags
44+
id: compute
45+
run: |
46+
INPUT="${{ github.event.inputs.version }}"
47+
REF_TYPE="${{ github.ref_type }}"
48+
REF_NAME="${{ github.ref_name }}"
49+
50+
# Determine version source
51+
if [[ -n "$INPUT" ]]; then
52+
VERSION="${INPUT#v}"
53+
elif [[ "$REF_TYPE" == "tag" ]]; then
54+
VERSION="${REF_NAME#v}"
55+
else
56+
VERSION=""
57+
fi
58+
59+
TAGS=""
60+
61+
if [[ -n "$VERSION" ]]; then
62+
MAJOR=$(echo "$VERSION" | cut -d. -f1)
63+
MINOR=$(echo "$VERSION" | cut -d. -f2)
64+
65+
if [[ "$VERSION" == *-* ]]; then
66+
# prerelease: only version tag
67+
TAGS="$VERSION"
68+
else
69+
# stable release: version + hierarchy + latest
70+
TAGS="$VERSION,${MAJOR}.${MINOR},${MAJOR},postgresql-latest,latest"
71+
fi
72+
else
73+
# Non-tag build (e.g. from main branch)
74+
TAGS="${REF_NAME}"
75+
fi
76+
77+
echo "tags=$TAGS" >> $GITHUB_OUTPUT
78+
echo "Computed tags: $TAGS"
79+
80+
- name: Build and push Docker image
81+
run: |
82+
TAGS="${{ steps.compute.outputs.tags }}"
83+
84+
# Set image targets conditionally
85+
if [[ "${{ github.repository }}" == "umami-software/umami" ]]; then
86+
IMAGES=("umamisoftware/umami" "ghcr.io/${{ github.repository }}")
87+
else
88+
IMAGES=("ghcr.io/${{ github.repository }}")
89+
fi
90+
91+
for IMAGE in "${IMAGES[@]}"; do
92+
echo "Building and pushing $IMAGE with tags: $TAGS"
93+
docker buildx build \
94+
--platform linux/amd64,linux/arm64 \
95+
--push \
96+
$(echo "$TAGS" | tr ',' '\n' | sed "s|^|--tag ${IMAGE}:|") \
97+
--cache-from type=gha \
98+
--cache-to type=gha,mode=max \
99+
.
100+
done

.github/workflows/ci.yml

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
2-
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
3-
41
name: Node.js CI
52

63
on: [push]
@@ -11,26 +8,30 @@ env:
118

129
jobs:
1310
build:
11+
if: github.repository == 'umami-software/umami'
1412
runs-on: ubuntu-latest
1513

1614
strategy:
1715
matrix:
1816
include:
1917
- node-version: 18.18
18+
pnpm-version: 10
2019
db-type: postgresql
21-
- node-version: 18.18
22-
db-type: mysql
2320

2421
steps:
2522
- uses: actions/checkout@v4
23+
- uses: pnpm/action-setup@v4 # required so that setup-node will work
24+
with:
25+
version: ${{ matrix.pnpm-version }}
26+
run_install: false
2627
- name: Use Node.js ${{ matrix.node-version }}
2728
uses: actions/setup-node@v4
2829
with:
2930
node-version: ${{ matrix.node-version }}
30-
cache: 'yarn'
31+
cache: 'pnpm'
3132
env:
3233
DATABASE_TYPE: ${{ matrix.db-type }}
33-
- run: npm install --global yarn
34-
- run: yarn install
35-
- run: yarn test
36-
- run: yarn build
34+
- run: npm install --global pnpm
35+
- run: pnpm install
36+
- run: pnpm test
37+
- run: pnpm build

.gitignore

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,23 @@
44
node_modules
55
.pnp
66
.pnp.js
7+
.pnpm-store
8+
package-lock.json
79

810
# testing
911
/coverage
1012

1113
# next.js
12-
/.next/
13-
/out/
14-
/prisma/
14+
/.next
15+
/out
1516

1617
# production
1718
/build
1819
/public/script.js
1920
/geo
2021
/dist
22+
/generated
23+
/src/generated
2124

2225
# misc
2326
.DS_Store

.husky/pre-commit

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1 @@
1-
#!/bin/sh
2-
. "$(dirname "$0")/_/husky.sh"
3-
41
npx lint-staged

0 commit comments

Comments
 (0)