Compare commits

...

20 Commits

Author SHA1 Message Date
83144f737c update 2025-03-12 15:55:21 +08:00
9eb9e48875 update 2025-01-22 19:12:59 +08:00
3bcb0dae8b update 2025-01-22 19:02:01 +08:00
0811b9a962 Update file inject.js 2024-02-18 10:58:02 +00:00
897a9f3cb7 Update file inject.js 2024-02-18 10:51:11 +00:00
53af65e4f2 Update Dockerfile 2024-02-18 10:23:45 +00:00
082fac842d Update 3 files
- /dist.tgz
- /docker-entrypoint.sh
- /Dockerfile
2024-01-16 03:23:55 +00:00
cuichenyang
9eef534193 update 2023-12-01 12:34:01 +08:00
cuichenyang
487aa30812 updatew 2023-12-01 12:32:02 +08:00
cuichenyang
ccf5989aa5 Merge remote-tracking branch 'origin/main' 2023-11-30 15:35:48 +08:00
f66683d772 Merge branch 'set-secret-detection-config-1' into 'main'
在 `.gitlab-ci.yml` 中配置 Secret 检测,如果该文件不存在则创建此文件

See merge request crack/n8n!2
2023-11-16 09:33:10 +00:00
111fb1009b .gitlab-ci.yml 中配置 Secret 检测,如果该文件不存在则创建此文件 2023-11-16 09:29:50 +00:00
c52ed011c9 更新.gitlab-ci.yml文件 2023-11-16 09:26:59 +00:00
4cd8b02891 Merge branch 'set-container-scanning-config-1' into 'main'
在 `.gitlab-ci.yml` 中配置容器扫描,如果该文件不存在则创建该文件

See merge request crack/n8n!1
2023-11-16 09:25:00 +00:00
999f91cbfa Update file .gitlab-ci.yml 2023-11-16 09:22:21 +00:00
84d2988c82 Update file .gitlab-ci.yml 2023-11-16 09:22:11 +00:00
639bd83262 Update file .gitlab-ci.yml 2023-11-16 09:16:39 +00:00
95ed08d25c .gitlab-ci.yml 中配置容器扫描,如果该文件不存在则创建该文件 2023-11-16 09:14:12 +00:00
948ca15fe3 Update docker-entrypoint.sh 2023-11-16 06:42:31 +00:00
59b675e29a Update docker-entrypoint.sh 2023-11-16 06:38:19 +00:00
7 changed files with 74 additions and 59 deletions

View File

@@ -0,0 +1,31 @@
name: Build and Push Docker Image
on:
workflow_dispatch:
inputs:
tag:
description: "Docker tag"
required: true
default: "latest"
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
registry: git.yoshino-s.xyz
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build and push Docker image
uses: docker/build-push-action@v6
with:
context: .
push: true
tags: git.yoshino-s.xyz/${{ gitea.repository }}:${{ gitea.event.inputs.tag }}

View File

@@ -1,23 +1,33 @@
# You can override the included template(s) by including variable overrides
# SAST customization: https://docs.gitlab.com/ee/user/application_security/sast/#customizing-the-sast-settings
# Secret Detection customization: https://docs.gitlab.com/ee/user/application_security/secret_detection/#customizing-settings
# Dependency Scanning customization: https://docs.gitlab.com/ee/user/application_security/dependency_scanning/#customizing-the-dependency-scanning-settings
# Container Scanning customization: https://docs.gitlab.com/ee/user/application_security/container_scanning/#customizing-the-container-scanning-settings
# Note that environment variables can be set in several places
# See https://docs.gitlab.com/ee/ci/variables/#cicd-variable-precedence
stages:
- release
- release
- test
variables:
TAGS: ""
CI_APPLICATION_REPOSITORY: "$CI_REGISTRY_IMAGE"
CI_APPLICATION_TAG: nightly
release-image:
image: docker:24.0.6
stage: release
rules:
- if: '$TAGS'
- if: "$CI_APPLICATION_TAG"
before_script:
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
script:
- if [ -z "$TAGS" ]; then export TAGS=$(cat tags.txt); fi
- |
for tag in $TAGS; do
export IMAGE_TAG=$CI_REGISTRY_IMAGE:$tag
echo $IMAGE_TAG
sed "s/latest/$tag/g" Dockerfile > Dockerfile.tmp
docker build . --pull -f Dockerfile.tmp -t $IMAGE_TAG
docker push $IMAGE_TAG
done
- |-
export IMAGE_TAG=$CI_APPLICATION_REPOSITORY:$CI_APPLICATION_TAG
echo $IMAGE_TAG
sed "s/latest/$CI_APPLICATION_TAG/g" Dockerfile > Dockerfile.tmp
docker build . --pull -f Dockerfile.tmp -t $IMAGE_TAG
docker push $IMAGE_TAG
container_scanning:
needs:
- release-image
include:
- template: Jobs/Container-Scanning.gitlab-ci.yml
- template: Security/Secret-Detection.gitlab-ci.yml

View File

@@ -1,13 +0,0 @@
repos:
- repo: https://github.com/python-poetry/poetry
rev: "1.5.1"
hooks:
- id: poetry-check
- id: poetry-lock
- id: poetry-export
- id: poetry-export
args: ["--with=dev", "-o", "requirements.dev.txt"]
- repo: https://github.com/pre-commit/mirrors-autopep8
rev: "v1.7.0"
hooks:
- id: autopep8

View File

@@ -1,12 +1,9 @@
#first stage - builder
FROM n8nio/n8n:latest
FROM ghcr.io/n8n-io/n8n:latest
USER root
COPY inject.js /tmp
COPY dist.tgz /tmp
RUN cat /tmp/inject.js >> /usr/local/lib/node_modules/n8n/packages/cli/dist/License.js
COPY docker-entrypoint.sh /
RUN cat /tmp/inject.js >> /usr/local/lib/node_modules/n8n/dist/license.js
USER node

BIN
dist.tgz

Binary file not shown.

View File

@@ -1,23 +0,0 @@
#!/bin/sh
mkdir -p ~/.n8n/nodes
if [ -n "$NPM_PACKAGES" ]; then
cd ~/.n8n/nodes
npm install $NPM_PACKAGES
cd -
fi
if [ -n "$CUSTOM_UI" ]; then
# extract /tmp/dist.tgz to /usr/local/lib/node_modules/n8n/packages/dits
rm -rf /usr/local/lib/node_modules/n8n/packages/dits
tar -xzf /tmp/dist.tgz -C /usr/local/lib/node_modules/n8n/packages
rm /tmp/dist.tgz
fi
if [ "$#" -gt 0 ]; then
# Got started with arguments
exec n8n "$@"
else
# Got started without arguments
exec n8n
fi

View File

@@ -22,7 +22,7 @@ license_sdk_1.LicenseManager.prototype.licenseCert = {
validFrom: new Date(),
validTo: new Date(Date.now() + 1000 * 60 * 60 * 24 * 365),
features: {
planName: "Hacky",
planName: "Enterprise",
"feat:sharing": true,
"feat:ldap": true,
"feat:saml": true,
@@ -31,10 +31,23 @@ license_sdk_1.LicenseManager.prototype.licenseCert = {
"feat:variables": true,
"feat:debugInEditor": true,
"feat:workflowHistory": true,
"feat:showNonProdBanner": true,
"feat:showNonProdBanner": false,
"feat:externalSecrets": true,
"feat:apiDisabled": true,
"feat:apiDisabled": false,
"feat:sourceControl": true,
"feat:binaryDataS3": true,
"feat:multipleMainInstances": true,
"feat:workerView": true,
"feat:advancedPermissions": true,
'feat:projectRole:admin': true,
'feat:projectRole:editor': true,
'feat:projectRole:viewer': true,
'feat:aiAssistant': true,
'feat:askAi': true,
'feat:communityNodes:customRegistry': true,
'feat:aiCredits': true,
'quota:aiCredits': 114514,
'quota:maxTeamProjects': 114514,
},
},
],