Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
dc5eb260d4 | ||
|
|
f9fd3dac5a |
No files matched your search
@@ -60,7 +60,7 @@ jobs:
|
||||
TURBO_PLATFORM: linux/amd64
|
||||
steps:
|
||||
- uses: actions/checkout@v7
|
||||
if: '!env.ACT'
|
||||
if: "!env.ACT"
|
||||
with:
|
||||
fetch-depth: 0
|
||||
persist-credentials: false
|
||||
@@ -111,7 +111,7 @@ jobs:
|
||||
packages: write
|
||||
steps:
|
||||
- uses: actions/checkout@v7
|
||||
if: '!env.ACT'
|
||||
if: "!env.ACT"
|
||||
with:
|
||||
persist-credentials: false
|
||||
ref: ${{ github.event_name == 'workflow_dispatch' && inputs.ref || '' }}
|
||||
@@ -120,11 +120,11 @@ jobs:
|
||||
uses: ./tooling/github/setup
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
if: '!env.ACT'
|
||||
if: "!env.ACT"
|
||||
uses: docker/setup-buildx-action@v4
|
||||
|
||||
- name: Build container once
|
||||
if: '!env.ACT'
|
||||
if: "!env.ACT"
|
||||
uses: docker/build-push-action@v7
|
||||
with:
|
||||
context: .
|
||||
@@ -165,7 +165,7 @@ jobs:
|
||||
--tag homarr-ci --tag homarr-e2e "${secret_args[@]}" .
|
||||
|
||||
- name: Cache Playwright browsers
|
||||
if: '!env.ACT'
|
||||
if: "!env.ACT"
|
||||
id: playwright-cache
|
||||
uses: actions/cache@v6
|
||||
with:
|
||||
@@ -316,8 +316,8 @@ jobs:
|
||||
run: test -n "$PR_NUMBER" || { echo "pr_number is required for cleanup"; exit 1; }
|
||||
|
||||
- name: Delete GHCR package version
|
||||
if: '!env.ACT'
|
||||
uses: actions/github-script@v8
|
||||
if: "!env.ACT"
|
||||
uses: actions/github-script@v9
|
||||
with:
|
||||
script: |
|
||||
const packageName = "homarr-test";
|
||||
|
||||
@@ -1,64 +0,0 @@
|
||||
name: "[PR] Cleanup Docker preview image"
|
||||
|
||||
on:
|
||||
pull_request_target:
|
||||
types: [closed]
|
||||
branches:
|
||||
- dev
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
pr-number:
|
||||
description: "PR number whose preview image to delete"
|
||||
required: true
|
||||
type: number
|
||||
|
||||
permissions:
|
||||
packages: write
|
||||
|
||||
env:
|
||||
REGISTRY: ghcr.io
|
||||
IMAGE_TAG: pr-${{ github.event.inputs.pr-number || github.event.number }}
|
||||
|
||||
jobs:
|
||||
delete-image:
|
||||
name: Delete PR preview image from GHCR
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 5
|
||||
steps:
|
||||
- name: Delete package version
|
||||
uses: actions/github-script@v8
|
||||
with:
|
||||
script: |
|
||||
const packageName = 'homarr-test';
|
||||
const org = context.repo.owner;
|
||||
const tag = process.env.IMAGE_TAG;
|
||||
|
||||
const versions = await github.paginate(
|
||||
github.rest.packages.getAllPackageVersionsForPackageOwnedByOrg,
|
||||
{
|
||||
package_type: 'container',
|
||||
package_name: packageName,
|
||||
org,
|
||||
per_page: 100,
|
||||
}
|
||||
);
|
||||
|
||||
const target = versions.find(v =>
|
||||
v.metadata?.container?.tags?.includes(tag)
|
||||
);
|
||||
|
||||
if (!target) {
|
||||
console.log(`No package version found with tag "${tag}". Nothing to delete.`);
|
||||
return;
|
||||
}
|
||||
|
||||
console.log(`Deleting package version ${target.id} (tag: ${tag})`);
|
||||
|
||||
await github.rest.packages.deletePackageVersionForOrg({
|
||||
package_type: 'container',
|
||||
package_name: packageName,
|
||||
org,
|
||||
package_version_id: target.id,
|
||||
});
|
||||
|
||||
console.log(`Successfully deleted package version ${target.id}`);
|
||||
@@ -1,89 +0,0 @@
|
||||
name: "[PR] Publish Docker preview image"
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
types: [opened, synchronize, reopened, ready_for_review]
|
||||
branches:
|
||||
- dev
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
pr-number:
|
||||
description: "PR number (uses head ref of that PR)"
|
||||
required: true
|
||||
type: number
|
||||
ref:
|
||||
description: "Git ref to build (branch, tag, or SHA)"
|
||||
required: false
|
||||
type: string
|
||||
default: ""
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
|
||||
env:
|
||||
SKIP_ENV_VALIDATION: true
|
||||
REGISTRY: ghcr.io
|
||||
GHCR_REPO: ghcr.io/homarr-labs/homarr-test
|
||||
TURBO_TELEMETRY_DISABLED: 1
|
||||
|
||||
concurrency:
|
||||
group: pr-docker-${{ github.event.inputs.pr-number || github.event.number }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
build-and-push:
|
||||
name: Build and push PR preview image
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 25
|
||||
if: |
|
||||
github.event_name == 'workflow_dispatch' ||
|
||||
(
|
||||
github.event_name == 'pull_request' &&
|
||||
github.event.pull_request.draft == false &&
|
||||
github.event.pull_request.head.repo.full_name == github.repository
|
||||
)
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
with:
|
||||
persist-credentials: false
|
||||
ref: ${{ github.event.inputs.ref || '' }}
|
||||
|
||||
- name: Determine tag
|
||||
id: tag
|
||||
run: |
|
||||
PR_NUMBER="${{ github.event.inputs.pr-number || github.event.number }}"
|
||||
echo "tag=pr-${PR_NUMBER}" >> "$GITHUB_OUTPUT"
|
||||
echo "pr-number=${PR_NUMBER}" >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: Docker meta
|
||||
id: meta
|
||||
uses: docker/metadata-action@v6
|
||||
with:
|
||||
images: "${{ env.GHCR_REPO }}"
|
||||
tags: |
|
||||
type=raw,value=${{ steps.tag.outputs.tag }}
|
||||
|
||||
- name: Log in to the Container registry
|
||||
uses: docker/login-action@v4
|
||||
with:
|
||||
registry: ${{ env.REGISTRY }}
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v4
|
||||
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v7
|
||||
with:
|
||||
context: .
|
||||
network: host
|
||||
platforms: linux/amd64
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
push: true
|
||||
cache-from: type=gha
|
||||
cache-to: type=gha,mode=max
|
||||
env:
|
||||
SKIP_ENV_VALIDATION: true
|
||||
+1
-18
@@ -7,26 +7,9 @@ WORKDIR /app
|
||||
RUN apk add --no-cache libc6-compat curl bash && apk update
|
||||
|
||||
RUN corepack enable pnpm
|
||||
COPY pnpm-lock.yaml pnpm-workspace.yaml package.json ./
|
||||
COPY patches ./patches
|
||||
# Workaround for pnpm/pnpm#5268: pnpm fetch crashes when patchedDependencies
|
||||
# are configured with nodeLinker: hoisted. The applyPatchToDir function tries
|
||||
# to chdir into node_modules/<pkg> which doesn't exist during fetch (only the
|
||||
# content-addressable store is populated). By temporarily switching to the
|
||||
# isolated linker, patches apply inside the virtual store (node_modules/.pnpm/...)
|
||||
# which IS created by pnpm fetch. The original hoisted linker is restored
|
||||
# before the install step so the final node_modules layout stays flat.
|
||||
RUN --mount=type=cache,id=pnpm-store,target=/pnpm/store \
|
||||
pnpm config set store-dir /pnpm/store && \
|
||||
sed -i 's/nodeLinker: hoisted/nodeLinker: isolated/' pnpm-workspace.yaml && \
|
||||
pnpm fetch && \
|
||||
sed -i 's/nodeLinker: isolated/nodeLinker: hoisted/' pnpm-workspace.yaml
|
||||
|
||||
COPY . .
|
||||
# Follow the pnpm fetch pattern from https://pnpm.io/cli/fetch
|
||||
# --frozen-lockfile is omitted as recommended by the pnpm fetch docs
|
||||
RUN --mount=type=cache,id=pnpm-store,target=/pnpm/store \
|
||||
pnpm install --recursive
|
||||
pnpm config set store-dir /pnpm/store && pnpm install --recursive --frozen-lockfile
|
||||
|
||||
ARG SKIP_ENV_VALIDATION='true'
|
||||
ARG CI='true'
|
||||
|
||||
Generated
+3498
-4202
File diff suppressed because it is too large.
Load diff
+10
-10
@@ -93,11 +93,11 @@ catalog:
|
||||
"@types/video.js": ^7.3.58
|
||||
"@types/ws": ^8.18.1
|
||||
"@types/xml2js": ^0.4.14
|
||||
posthog-js: ^1.399.0
|
||||
posthog-node: ^5.40.0
|
||||
posthog-js: ^1.398.2
|
||||
posthog-node: ^5.39.2
|
||||
"@vitejs/plugin-react": ^6.0.3
|
||||
"@vitest/coverage-v8": ^4.1.10
|
||||
"@vitest/ui": ^4.1.10
|
||||
"@vitest/coverage-v8": ^4.1.9
|
||||
"@vitest/ui": ^4.1.9
|
||||
"@xterm/addon-canvas": ^0.7.0
|
||||
"@xterm/addon-fit": 0.11.0
|
||||
"@xterm/xterm": ^6.0.0
|
||||
@@ -145,14 +145,14 @@ catalog:
|
||||
mantine-react-table: npm:mantine-react-table-open@9.0.3
|
||||
mcp-handler: ^1.1.0
|
||||
maria2: ^0.4.1
|
||||
mysql2: 3.22.6
|
||||
mysql2: 3.22.5
|
||||
next: 16.2.10
|
||||
next-auth: 5.0.0-beta.31
|
||||
next-intl: 4.13.1
|
||||
node-loader: ^2.1.0
|
||||
octokit: ^5.0.5
|
||||
oxfmt: ^0.58.0
|
||||
oxlint: ^1.73.0
|
||||
oxlint: ^1.72.0
|
||||
pg: ^8.22.0
|
||||
postcss-preset-mantine: ^1.18.0
|
||||
prismjs: ^1.30.0
|
||||
@@ -177,13 +177,13 @@ catalog:
|
||||
tsdav: ^2.3.0
|
||||
tsx: 4.20.4
|
||||
turbo: ^2.10.4
|
||||
typescript: ^7.0.2
|
||||
vite: ^8.1.4
|
||||
typescript: ^7.0.0
|
||||
vite: ^8.1.2
|
||||
undici: 7.28.0
|
||||
use-deep-compare-effect: ^1.8.1
|
||||
video.js: ^8.23.9
|
||||
vite-tsconfig-paths: ^6.1.1
|
||||
vitest: ^4.1.10
|
||||
vitest: ^4.1.9
|
||||
winston: 3.19.0
|
||||
ws: ^8.21.0
|
||||
xml2js: ^0.6.2
|
||||
@@ -229,7 +229,7 @@ overrides:
|
||||
"tar-fs@>=3.0.0 <3.0.9": ">=3.1.3"
|
||||
"tar-fs@>=2.0.0 <2.1.3": ">=3.1.3"
|
||||
"tmp@<=0.2.3": ">=0.2.7"
|
||||
"vite@>=5.0.0 <=5.4.18": ">=8.1.4"
|
||||
"vite@>=5.0.0 <=5.4.18": ">=8.1.3"
|
||||
patchedDependencies:
|
||||
"@types/node-unifi": "patches/@types__node-unifi.patch"
|
||||
"trpc-to-openapi": "patches/trpc-to-openapi.patch"
|
||||
|
||||
Reference in new issue
Block a user