Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(release): automatic release v1.0.0 #1732

Merged
merged 14 commits into from
Dec 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .github/workflows/deployment-docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ jobs:
SKIP_RELEASE: ${{ github.event_name == 'workflow_dispatch' || github.ref_name == 'dev' }}
outputs:
version: ${{ steps.read-semver.outputs.version || steps.version-fallback.outputs.version }}
git_ref: ${{ steps.read-git-ref.outputs.ref || github.ref }}

steps:
- run: echo "Skipping release for workflow_dispatch event"
Expand Down Expand Up @@ -87,9 +88,16 @@ jobs:
run: |
git fetch --tags
echo "version=$(git describe --tags --abbrev=0)" >> "$GITHUB_OUTPUT"
- name: Read git ref
if: env.SKIP_RELEASE == 'false'
id: read-git-ref
run: |
echo "ref=$(git rev-parse HEAD)" >> "$GITHUB_OUTPUT"
- name: Update dev branch
if: env.SKIP_RELEASE == 'false'
continue-on-error: true # Prevent pipeline from failing when merge fails
env:
GITHUB_TOKEN: ${{ steps.obtainToken.outputs.token }}
run: |
git fetch origin dev
git checkout dev
Expand All @@ -107,6 +115,8 @@ jobs:
PUSH_IMAGE: ${{ github.event_name != 'workflow_dispatch' || github.events.inputs.push-image == true }}
steps:
- uses: actions/checkout@v4
with:
ref: ${{ needs.release.outputs.git_ref }}
- name: Discord notification
if: ${{ github.events.inputs.send-notifications != false }}
env:
Expand Down
1 change: 1 addition & 0 deletions apps/nextjs/next.config.mjs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// Importing env files here to validate on build
import "@homarr/auth/env.mjs";
import "@homarr/db/env.mjs";

import MillionLint from "@million/lint";
import createNextIntlPlugin from "next-intl/plugin";
Expand Down
4 changes: 2 additions & 2 deletions apps/nextjs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
"glob": "^11.0.0",
"jotai": "^2.10.4",
"mantine-react-table": "2.0.0-beta.7",
"next": "^14.2.20",
"next": "^14.2.21",
"postcss-preset-mantine": "^1.17.0",
"prismjs": "^1.29.0",
"react": "^19.0.0",
Expand All @@ -84,7 +84,7 @@
"@types/chroma-js": "2.4.5",
"@types/node": "^22.10.2",
"@types/prismjs": "^1.26.5",
"@types/react": "^19.0.1",
"@types/react": "^19.0.2",
"@types/react-dom": "^19.0.2",
"@types/swagger-ui-react": "^4.18.3",
"concurrently": "^9.1.0",
Expand Down
2 changes: 1 addition & 1 deletion apps/nextjs/src/app/[locale]/auth/invite/[id]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { Card, Center, Stack, Text, Title } from "@mantine/core";
import { auth } from "@homarr/auth/next";
import { isProviderEnabled } from "@homarr/auth/server";
import { and, db, eq } from "@homarr/db";
import { invites } from "@homarr/db/schema/sqlite";
import { invites } from "@homarr/db/schema";
import { getScopedI18n } from "@homarr/translation/server";

import { HomarrLogoWithTitle } from "~/components/layout/logo/homarr-logo";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { IconHomeOff } from "@tabler/icons-react";

import { auth } from "@homarr/auth/next";
import { db } from "@homarr/db";
import { boards } from "@homarr/db/schema/sqlite";
import { boards } from "@homarr/db/schema";
import { getI18n } from "@homarr/translation/server";

import type { BoardNotFoundProps } from "~/components/board/not-found";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,19 @@ export const ImportDropZone = ({ loading, updateFile }: ImportDropZoneProps) =>
}}
acceptColor="blue.6"
rejectColor="red.6"
accept={[MIME_TYPES.zip]}
accept={[MIME_TYPES.zip, "application/x-zip-compressed"]}
loading={loading}
multiple={false}
maxSize={1024 * 1024 * 1024 * 64} // 64 MB
onReject={(rejections) => {
console.error(
"Rejected files",
rejections.map(
(rejection) =>
`File: ${rejection.file.name} size=${rejection.file.size} fileType=${rejection.file.type}\n - ${rejection.errors.map((error) => error.message).join("\n - ")}`,
),
);
}}
>
<Group justify="center" gap="xl" mih={220} style={{ pointerEvents: "none" }}>
<Dropzone.Accept>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { notFound } from "next/navigation";
import { auth } from "@homarr/auth/next";
import { isProviderEnabled } from "@homarr/auth/server";
import { db, inArray } from "@homarr/db";
import { groups } from "@homarr/db/schema/sqlite";
import { groups } from "@homarr/db/schema";
import { everyoneGroup } from "@homarr/definitions";
import { getScopedI18n } from "@homarr/translation/server";

Expand Down
2 changes: 1 addition & 1 deletion apps/nextjs/src/app/api/[...trpc]/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { hashPasswordAsync } from "@homarr/auth";
import type { Session } from "@homarr/auth";
import { createSessionAsync } from "@homarr/auth/server";
import { db, eq } from "@homarr/db";
import { apiKeys } from "@homarr/db/schema/sqlite";
import { apiKeys } from "@homarr/db/schema";
import { logger } from "@homarr/log";

const handlerAsync = async (req: NextRequest) => {
Expand Down
2 changes: 1 addition & 1 deletion apps/nextjs/src/app/api/user-medias/[id]/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { NextResponse } from "next/server";
import type { NextRequest } from "next/server";

import { db, eq } from "@homarr/db";
import { medias } from "@homarr/db/schema/sqlite";
import { medias } from "@homarr/db/schema";

export async function GET(_req: NextRequest, { params }: { params: { id: string } }) {
const image = await db.query.medias.findFirst({
Expand Down
26 changes: 0 additions & 26 deletions apps/nextjs/src/env.mjs
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
import { createEnv } from "@t3-oss/env-nextjs";
import { z } from "zod";

const isUsingDbUrl = Boolean(process.env.DB_URL);
const isUsingDbHost = Boolean(process.env.DB_HOST);
const isUsingDbCredentials = process.env.DB_DRIVER === "mysql2";

export const env = createEnv({
shared: {
VERCEL_URL: z
Expand All @@ -19,21 +15,6 @@ export const env = createEnv({
* built with invalid env vars.
*/
server: {
DB_DRIVER: z.enum(["better-sqlite3", "mysql2"]).default("better-sqlite3"),
// If the DB_HOST is set, the DB_URL is optional
DB_URL: isUsingDbHost ? z.string().optional() : z.string(),
DB_HOST: isUsingDbUrl ? z.string().optional() : z.string(),
DB_PORT: isUsingDbUrl
? z.string().regex(/\d+/).transform(Number).optional()
: z
.string()
.regex(/\d+/)
.transform(Number)
.refine((number) => number >= 1)
.default("3306"),
DB_USER: isUsingDbCredentials ? z.string() : z.string().optional(),
DB_PASSWORD: isUsingDbCredentials ? z.string() : z.string().optional(),
DB_NAME: isUsingDbUrl ? z.string().optional() : z.string(),
// Comma separated list of docker hostnames that can be used to connect to query the docker endpoints (localhost:2375,host.docker.internal:2375, ...)
DOCKER_HOSTNAMES: z.string().optional(),
DOCKER_PORTS: z.number().optional(),
Expand All @@ -51,13 +32,6 @@ export const env = createEnv({
runtimeEnv: {
VERCEL_URL: process.env.VERCEL_URL,
PORT: process.env.PORT,
DB_URL: process.env.DB_URL,
DB_HOST: process.env.DB_HOST,
DB_USER: process.env.DB_USER,
DB_PASSWORD: process.env.DB_PASSWORD,
DB_NAME: process.env.DB_NAME,
DB_PORT: process.env.DB_PORT,
DB_DRIVER: process.env.DB_DRIVER,
NODE_ENV: process.env.NODE_ENV,
DOCKER_HOSTNAMES: process.env.DOCKER_HOSTNAMES,
DOCKER_PORTS: process.env.DOCKER_PORTS,
Expand Down
2 changes: 1 addition & 1 deletion apps/tasks/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"dayjs": "^1.11.13",
"dotenv": "^16.4.7",
"superjson": "2.2.2",
"undici": "7.1.1"
"undici": "7.2.0"
},
"devDependencies": {
"@homarr/eslint-config": "workspace:^0.2.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/analytics/src/send-server-analytics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { Umami } from "@umami/node";

import { count, db } from "@homarr/db";
import { getServerSettingByKeyAsync } from "@homarr/db/queries";
import { integrations, items, users } from "@homarr/db/schema/sqlite";
import { integrations, items, users } from "@homarr/db/schema";
import { logger } from "@homarr/log";
import type { defaultServerSettings } from "@homarr/server-settings";

Expand Down
2 changes: 1 addition & 1 deletion packages/api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"@trpc/react-query": "next",
"@trpc/server": "next",
"dockerode": "^4.0.2",
"next": "^14.2.20",
"next": "^14.2.21",
"react": "^19.0.0",
"superjson": "2.2.2",
"trpc-to-openapi": "^2.1.0"
Expand Down
2 changes: 1 addition & 1 deletion packages/api/src/middlewares/integration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { decryptSecret } from "@homarr/common/server";
import type { AtLeastOneOf } from "@homarr/common/types";
import type { Database } from "@homarr/db";
import { and, eq, inArray } from "@homarr/db";
import { integrations } from "@homarr/db/schema/sqlite";
import { integrations } from "@homarr/db/schema";
import type { IntegrationKind } from "@homarr/definitions";
import { z } from "@homarr/validation";

Expand Down
2 changes: 1 addition & 1 deletion packages/api/src/middlewares/item.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { TRPCError } from "@trpc/server";

import { and, eq } from "@homarr/db";
import { items } from "@homarr/db/schema/sqlite";
import { items } from "@homarr/db/schema";
import type { WidgetKind } from "@homarr/definitions";
import { z } from "@homarr/validation";

Expand Down
2 changes: 1 addition & 1 deletion packages/api/src/router/apiKeys.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { createSaltAsync, hashPasswordAsync } from "@homarr/auth";
import { generateSecureRandomToken } from "@homarr/common/server";
import { createId, db } from "@homarr/db";
import { apiKeys } from "@homarr/db/schema/sqlite";
import { apiKeys } from "@homarr/db/schema";

import { createTRPCRouter, permissionRequiredProcedure } from "../trpc";

Expand Down
2 changes: 1 addition & 1 deletion packages/api/src/router/app.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { TRPCError } from "@trpc/server";

import { asc, createId, eq, inArray, like } from "@homarr/db";
import { apps } from "@homarr/db/schema/sqlite";
import { apps } from "@homarr/db/schema";
import { selectAppSchema } from "@homarr/db/validationSchemas";
import { validation, z } from "@homarr/validation";

Expand Down
2 changes: 1 addition & 1 deletion packages/api/src/router/app/app-access-control.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import SuperJSON from "superjson";

import type { Session } from "@homarr/auth";
import { db, eq, or } from "@homarr/db";
import { items } from "@homarr/db/schema/sqlite";
import { items } from "@homarr/db/schema";

import type { WidgetComponentProps } from "../../../../widgets/src";

Expand Down
2 changes: 1 addition & 1 deletion packages/api/src/router/board.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import {
items,
sections,
users,
} from "@homarr/db/schema/sqlite";
} from "@homarr/db/schema";
import type { WidgetKind } from "@homarr/definitions";
import { getPermissionsWithParents, widgetKinds } from "@homarr/definitions";
import { importOldmarrAsync } from "@homarr/old-import";
Expand Down
2 changes: 1 addition & 1 deletion packages/api/src/router/board/board-access.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import type { Session } from "@homarr/auth";
import { constructBoardPermissions } from "@homarr/auth/shared";
import type { Database, SQL } from "@homarr/db";
import { eq, inArray } from "@homarr/db";
import { boardGroupPermissions, boardUserPermissions, groupMembers } from "@homarr/db/schema/sqlite";
import { boardGroupPermissions, boardUserPermissions, groupMembers } from "@homarr/db/schema";
import type { BoardPermission } from "@homarr/definitions";

/**
Expand Down
2 changes: 1 addition & 1 deletion packages/api/src/router/docker/docker-router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import type Docker from "dockerode";
import type { Container } from "dockerode";

import { db, like, or } from "@homarr/db";
import { icons } from "@homarr/db/schema/sqlite";
import { icons } from "@homarr/db/schema";
import type { DockerContainerState } from "@homarr/definitions";
import { logger } from "@homarr/log";
import { createCacheChannel } from "@homarr/redis";
Expand Down
2 changes: 1 addition & 1 deletion packages/api/src/router/group.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { TRPCError } from "@trpc/server";

import type { Database } from "@homarr/db";
import { and, createId, eq, like, not, sql } from "@homarr/db";
import { groupMembers, groupPermissions, groups } from "@homarr/db/schema/sqlite";
import { groupMembers, groupPermissions, groups } from "@homarr/db/schema";
import { everyoneGroup } from "@homarr/definitions";
import { validation, z } from "@homarr/validation";

Expand Down
2 changes: 1 addition & 1 deletion packages/api/src/router/home.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import type { AnySQLiteTable } from "drizzle-orm/sqlite-core";
import { isProviderEnabled } from "@homarr/auth/server";
import type { Database } from "@homarr/db";
import { count } from "@homarr/db";
import { apps, boards, groups, integrations, invites, users } from "@homarr/db/schema/sqlite";
import { apps, boards, groups, integrations, invites, users } from "@homarr/db/schema";

import { createTRPCRouter, publicProcedure } from "../trpc";

Expand Down
2 changes: 1 addition & 1 deletion packages/api/src/router/icons.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { count, like } from "@homarr/db";
import { icons } from "@homarr/db/schema/sqlite";
import { icons } from "@homarr/db/schema";
import { validation } from "@homarr/validation";

import { createTRPCRouter, publicProcedure } from "../trpc";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import type { Session } from "@homarr/auth";
import { constructIntegrationPermissions } from "@homarr/auth/shared";
import type { Database, SQL } from "@homarr/db";
import { eq, inArray } from "@homarr/db";
import { groupMembers, integrationGroupPermissions, integrationUserPermissions } from "@homarr/db/schema/sqlite";
import { groupMembers, integrationGroupPermissions, integrationUserPermissions } from "@homarr/db/schema";
import type { IntegrationPermission } from "@homarr/definitions";

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
integrations,
integrationSecrets,
integrationUserPermissions,
} from "@homarr/db/schema/sqlite";
} from "@homarr/db/schema";
import type { IntegrationSecretKind } from "@homarr/definitions";
import {
getIntegrationKindsByCategory,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { decryptSecret } from "@homarr/common/server";
import type { Integration } from "@homarr/db/schema/sqlite";
import type { Integration } from "@homarr/db/schema";
import type { IntegrationKind, IntegrationSecretKind } from "@homarr/definitions";
import { getAllSecretKindOptions } from "@homarr/definitions";
import { integrationCreator, IntegrationTestConnectionError } from "@homarr/integrations";
Expand Down
2 changes: 1 addition & 1 deletion packages/api/src/router/invite.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { randomBytes } from "crypto";
import { TRPCError } from "@trpc/server";

import { asc, createId, eq } from "@homarr/db";
import { invites } from "@homarr/db/schema/sqlite";
import { invites } from "@homarr/db/schema";
import { selectInviteSchema } from "@homarr/db/validationSchemas";
import { z } from "@homarr/validation";

Expand Down
2 changes: 1 addition & 1 deletion packages/api/src/router/medias/media-router.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { TRPCError } from "@trpc/server";

import { and, createId, desc, eq, like } from "@homarr/db";
import { medias } from "@homarr/db/schema/sqlite";
import { medias } from "@homarr/db/schema";
import { validation, z } from "@homarr/validation";

import { createTRPCRouter, permissionRequiredProcedure, protectedProcedure } from "../../trpc";
Expand Down
2 changes: 1 addition & 1 deletion packages/api/src/router/onboard/onboard-queries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { objectEntries } from "@homarr/common";
import type { MaybePromise } from "@homarr/common/types";
import type { Database } from "@homarr/db";
import { eq } from "@homarr/db";
import { groups, onboarding } from "@homarr/db/schema/sqlite";
import { groups, onboarding } from "@homarr/db/schema";
import type { OnboardingStep } from "@homarr/definitions";
import { credentialsAdminGroup } from "@homarr/definitions";

Expand Down
2 changes: 1 addition & 1 deletion packages/api/src/router/onboard/onboard-router.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { onboarding } from "@homarr/db/schema/sqlite";
import { onboarding } from "@homarr/db/schema";
import { onboardingSteps } from "@homarr/definitions";
import { z, zodEnumFromArray } from "@homarr/validation";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { TRPCError } from "@trpc/server";

import { createId, eq, like, sql } from "@homarr/db";
import { searchEngines } from "@homarr/db/schema/sqlite";
import { searchEngines } from "@homarr/db/schema";
import { validation } from "@homarr/validation";

import { createTRPCRouter, permissionRequiredProcedure, protectedProcedure } from "../../trpc";
Expand Down
2 changes: 1 addition & 1 deletion packages/api/src/router/test/app.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { describe, expect, test, vi } from "vitest";

import type { Session } from "@homarr/auth";
import { createId } from "@homarr/db";
import { apps } from "@homarr/db/schema/sqlite";
import { apps } from "@homarr/db/schema";
import { createDb } from "@homarr/db/test";
import type { GroupPermissionKey } from "@homarr/definitions";

Expand Down
2 changes: 1 addition & 1 deletion packages/api/src/router/test/board.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import {
sections,
serverSettings,
users,
} from "@homarr/db/schema/sqlite";
} from "@homarr/db/schema";
import { createDb } from "@homarr/db/test";
import type { BoardPermission, GroupPermissionKey } from "@homarr/definitions";

Expand Down
2 changes: 1 addition & 1 deletion packages/api/src/router/test/board/board-access.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { describe, expect, test, vi } from "vitest";

import * as authShared from "@homarr/auth/shared";
import { createId, eq } from "@homarr/db";
import { boards, users } from "@homarr/db/schema/sqlite";
import { boards, users } from "@homarr/db/schema";
import { createDb } from "@homarr/db/test";

import { throwIfActionForbiddenAsync } from "../../board/board-access";
Expand Down
2 changes: 1 addition & 1 deletion packages/api/src/router/test/group.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { describe, expect, test, vi } from "vitest";
import type { Session } from "@homarr/auth";
import * as env from "@homarr/auth/env.mjs";
import { createId, eq } from "@homarr/db";
import { groupMembers, groupPermissions, groups, users } from "@homarr/db/schema/sqlite";
import { groupMembers, groupPermissions, groups, users } from "@homarr/db/schema";
import { createDb } from "@homarr/db/test";
import type { GroupPermissionKey } from "@homarr/definitions";

Expand Down
Loading
Loading