From 72a7a4551a708f43f678032993c9bb43205ce1b1 Mon Sep 17 00:00:00 2001 From: Marvin <127591405+Lokowitz@users.noreply.github.com> Date: Wed, 3 Dec 2025 12:46:27 +0100 Subject: [PATCH 1/3] Personal main updates (#480) * Create dev-image.yml * Add test-local target for local testing setup Added test-local target to Makefile for local testing. --- .github/workflows/dev-image.yml | 158 ++++++++++++++++++++++++++++++++ Makefile | 14 +++ 2 files changed, 172 insertions(+) create mode 100644 .github/workflows/dev-image.yml diff --git a/.github/workflows/dev-image.yml b/.github/workflows/dev-image.yml new file mode 100644 index 000000000..a41929660 --- /dev/null +++ b/.github/workflows/dev-image.yml @@ -0,0 +1,158 @@ +name: Create Dev-Image + +on: + pull_request_target: + branches: + - main + - dev + types: + - opened + - synchronize + - reopened + +concurrency: + group: pr-${{ github.event.pull_request.number }} + cancel-in-progress: true + +env: + TAG_URL: https://hub.docker.com/r/${{ vars.DOCKER_HUB_REPO }}/tags + TAG: ${{ vars.DOCKER_HUB_REPO }}:dev-pr${{ github.event.pull_request.number }} + TAG_PG: ${{ vars.DOCKER_HUB_REPO }}:postgresql-dev-pr${{ github.event.pull_request.number }} + +jobs: + build-w: + if: ${{ github.event.pull_request.head.repo.full_name != github.repository }} + runs-on: ubuntu-latest + environment: build-dev + + steps: + - name: Checkout PR code + uses: actions/checkout@v4 + with: + ref: refs/pull/${{github.event.pull_request.number}}/merge + + - name: Login to Docker Hub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKER_HUB_USERNAME }} + password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Build and push Docker image SQLITE + uses: docker/build-push-action@v6 + with: + context: . + platforms: linux/amd64 + push: true + tags: ${{ env.TAG }} + build-args: DATABASE=sqlite + cache-from: type=registry,ref=${{ vars.DOCKER_HUB_REPO }}:buildcache + cache-to: type=registry,ref=${{ vars.DOCKER_HUB_REPO }}:buildcache,mode=max + + - name: Build and push Docker image PG + uses: docker/build-push-action@v6 + with: + context: . + platforms: linux/amd64 + push: true + tags: ${{ env.TAG_PG }} + build-args: DATABASE=pg + cache-from: type=registry,ref=${{ vars.DOCKER_HUB_REPO }}:buildcache-pg + cache-to: type=registry,ref=${{ vars.DOCKER_HUB_REPO }}:buildcache-pg,mode=max + + - uses: actions/github-script@v8 + with: + script: | + const repoUrl = process.env.TAG_URL; + const tag = process.env.TAG; + const tagPg = process.env.TAG_PG; + github.rest.issues.createComment({ + issue_number: context.issue.number, + owner: context.repo.owner, + repo: context.repo.repo, + body: `> [!WARNING] + > This image may contain unchecked and breaking changes. Only use on own risk. + + 👋 Thanks for your PR! + Dev images for this PR are now available on [docker hub](${repoUrl}): + + **SQLITE Image:** + \`\`\` + ${tag} + \`\`\` + + **Postgresql Image:** + \`\`\` + ${tagPg} + \`\`\`` + }) + build-wo: + if: ${{ github.event.pull_request.head.repo.full_name == github.repository }} + runs-on: ubuntu-latest + + steps: + - name: Checkout PR code + uses: actions/checkout@v4 + with: + ref: refs/pull/${{github.event.pull_request.number}}/merge + + - name: Login to Docker Hub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKER_HUB_USERNAME }} + password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Build and push Docker image SQLITE + uses: docker/build-push-action@v6 + with: + context: . + platforms: linux/amd64 + push: true + tags: ${{ env.TAG }} + build-args: DATABASE=sqlite + cache-from: type=registry,ref=${{ vars.DOCKER_HUB_REPO }}:buildcache + cache-to: type=registry,ref=${{ vars.DOCKER_HUB_REPO }}:buildcache,mode=max + + - name: Build and push Docker image PG + uses: docker/build-push-action@v6 + with: + context: . + platforms: linux/amd64 + push: true + tags: ${{ env.TAG_PG }} + build-args: DATABASE=pg + cache-from: type=registry,ref=${{ vars.DOCKER_HUB_REPO }}:buildcache-pg + cache-to: type=registry,ref=${{ vars.DOCKER_HUB_REPO }}:buildcache-pg,mode=max + + - uses: actions/github-script@v8 + with: + script: | + const repoUrl = process.env.TAG_URL; + const tag = process.env.TAG; + const tagPg = process.env.TAG_PG; + github.rest.issues.createComment({ + issue_number: context.issue.number, + owner: context.repo.owner, + repo: context.repo.repo, + body: `> [!WARNING] + > This image may contain unchecked and breaking changes. Only use on own risk. + + 👋 Thanks for your PR! + Dev images for this PR are now available on [docker hub](${repoUrl}): + + **SQLITE Image:** + \`\`\` + ${tag} + \`\`\` + + **Postgresql Image:** + \`\`\` + ${tagPg} + \`\`\`` + }) + diff --git a/Makefile b/Makefile index 6c538a477..d690cba3e 100644 --- a/Makefile +++ b/Makefile @@ -91,3 +91,17 @@ test: clean: docker rmi pangolin + +test-local: + cp config/config.example.yml config/config.yml + npm run set:oss + npm run set:sqlite + npm run db:sqlite:generate + npm run db:sqlite:push + - npx tsc --noEmit + - docker build --build-arg DATABASE=pg -t fosrl/pangolin:postgresql-latest . + - docker build --build-arg DATABASE=sqlite -t fosrl/pangolin:latest . + npm run set:saas + - npx tsc --noEmit + - docker build --build-arg DATABASE=pg -t fosrl/pangolin:postgresql-saas-latest . + - docker build --build-arg DATABASE=sqlite -t fosrl/pangolin:saas-latest . From 83875a8e4d98f0b56a29dbb8485331f3379130f0 Mon Sep 17 00:00:00 2001 From: Marvin <127591405+Lokowitz@users.noreply.github.com> Date: Wed, 3 Dec 2025 14:24:29 +0100 Subject: [PATCH 2/3] fix zod error (#481) --- server/private/routers/hybrid.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/private/routers/hybrid.ts b/server/private/routers/hybrid.ts index 89188a1e5..c10f341ad 100644 --- a/server/private/routers/hybrid.ts +++ b/server/private/routers/hybrid.ts @@ -1219,7 +1219,7 @@ hybridRouter.post( ); const geoIpLookupParamsSchema = z.object({ - ip: z.union([z.ipv4(), z.ipv6()]) + ip: z.string().ip() }); hybridRouter.get( "/geoip/:ip", From 7569b415a13fdf224f9b95761ac3e1fb26da3284 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 31 Dec 2025 08:48:56 +0000 Subject: [PATCH 3/3] Bump qs from 6.14.0 to 6.14.1 Bumps [qs](https://github.com/ljharb/qs) from 6.14.0 to 6.14.1. - [Changelog](https://github.com/ljharb/qs/blob/main/CHANGELOG.md) - [Commits](https://github.com/ljharb/qs/compare/v6.14.0...v6.14.1) --- updated-dependencies: - dependency-name: qs dependency-version: 6.14.1 dependency-type: indirect ... Signed-off-by: dependabot[bot] --- package-lock.json | 27 ++++----------------------- 1 file changed, 4 insertions(+), 23 deletions(-) diff --git a/package-lock.json b/package-lock.json index 76e3e5c08..a8b7f0abf 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13952,6 +13952,7 @@ "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.32.0.tgz", "integrity": "sha512-whOE1HFo/qJDyX4SnXzP4N6zOWn79WhnCUY/iDR0mPfQZO8wcYE4JClzI2oZrhBnnMUCBCHZhO6VQyoBU95mZA==", "license": "MIT", + "peer": true, "dependencies": { "@rtsao/scc": "^1.1.0", "array-includes": "^3.1.9", @@ -20125,9 +20126,9 @@ } }, "node_modules/qs": { - "version": "6.14.0", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.14.0.tgz", - "integrity": "sha512-YWWTjgABSKcvs/nWBi9PycY/JiPJqOD4JA6o9Sej2AtvSGarXxKC3OQSk4pAarbdQlKAh5D4FCQkJNkW+GAn3w==", + "version": "6.14.1", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.14.1.tgz", + "integrity": "sha512-4EK3+xJl8Ts67nLYNwqw/dsFVnCf+qR7RgXSK9jEEm9unao3njwMDdmsdvoKBKHzxd7tCYz5e5M+SnMjdtXGQQ==", "license": "BSD-3-Clause", "dependencies": { "side-channel": "^1.1.0" @@ -20199,26 +20200,6 @@ "node": ">= 0.10" } }, - "node_modules/raw-body/node_modules/http-errors": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.1.tgz", - "integrity": "sha512-4FbRdAX+bSdmo4AUFuS0WNiPz8NgFt+r8ThgNWmlrjQjt1Q7ZR9+zTlce2859x4KSXrwIsaeTqDoKQmtP8pLmQ==", - "license": "MIT", - "dependencies": { - "depd": "~2.0.0", - "inherits": "~2.0.4", - "setprototypeof": "~1.2.0", - "statuses": "~2.0.2", - "toidentifier": "~1.0.1" - }, - "engines": { - "node": ">= 0.8" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/express" - } - }, "node_modules/raw-body/node_modules/iconv-lite": { "version": "0.7.0", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.7.0.tgz",