mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-25 04:34:06 -08:00
ci: Make builds release-channel aware. Add support for scheduled beta builds (#7323)
ADO-1121 --------- Co-authored-by: Jan Oberhauser <jan.oberhauser@gmail.com>
This commit is contained in:
parent
8f9fe6269b
commit
101255d186
45
.github/workflows/docker-image-beta.yml
vendored
Normal file
45
.github/workflows/docker-image-beta.yml
vendored
Normal file
|
@ -0,0 +1,45 @@
|
|||
name: Docker Image - Beta
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: '0 2 * * *'
|
||||
workflow_dispatch:
|
||||
branch:
|
||||
description: 'Branch to create image off.'
|
||||
required: true
|
||||
default: 'ai-tool-creation-breaking'
|
||||
tag:
|
||||
description: 'Name of the docker tag to create.'
|
||||
required: true
|
||||
default: 'ai-beta'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3.5.3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
ref: ${{ github.event.inputs.branch || 'ai-tool-creation-breaking' }}
|
||||
|
||||
- uses: docker/setup-qemu-action@v2
|
||||
- uses: docker/setup-buildx-action@v2
|
||||
|
||||
- name: Login to DockerHub
|
||||
uses: docker/login-action@v2.2.0
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v4.1.1
|
||||
with:
|
||||
context: .
|
||||
file: ./docker/images/n8n-custom/Dockerfile
|
||||
build-args: |
|
||||
N8N_RELEASE_TYPE=beta
|
||||
platforms: linux/amd64
|
||||
provenance: false
|
||||
push: true
|
||||
tags: ${{ secrets.DOCKER_USERNAME }}/n8n:${{ github.event.inputs.tag || 'ai-beta' }}
|
||||
no-cache: true
|
2
.github/workflows/docker-images-nightly.yml
vendored
2
.github/workflows/docker-images-nightly.yml
vendored
|
@ -73,6 +73,8 @@ jobs:
|
|||
uses: docker/build-push-action@v4.1.1
|
||||
with:
|
||||
context: .
|
||||
build-args: |
|
||||
N8N_RELEASE_TYPE=nightly
|
||||
file: ./docker/images/n8n-custom/Dockerfile
|
||||
platforms: linux/amd64
|
||||
provenance: false
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
ARG NODE_VERSION=18
|
||||
ARG N8N_RELEASE_TYPE=dev
|
||||
|
||||
# 1. Create an image to build n8n
|
||||
FROM n8nio/base:${NODE_VERSION} as builder
|
||||
|
@ -35,4 +36,5 @@ RUN \
|
|||
chown node:node .n8n
|
||||
USER node
|
||||
ENV NODE_ENV=production
|
||||
ENV N8N_RELEASE_TYPE=${N8N_RELEASE_TYPE}
|
||||
ENTRYPOINT ["tini", "--", "/docker-entrypoint.sh"]
|
||||
|
|
|
@ -6,6 +6,7 @@ RUN if [ -z "$N8N_VERSION" ] ; then echo "The N8N_VERSION argument is missing!"
|
|||
|
||||
ENV N8N_VERSION=${N8N_VERSION}
|
||||
ENV NODE_ENV=production
|
||||
ENV N8N_RELEASE_TYPE=stable
|
||||
RUN set -eux; \
|
||||
apkArch="$(apk --print-arch)"; \
|
||||
case "$apkArch" in \
|
||||
|
|
|
@ -249,7 +249,7 @@ export class Server extends AbstractServer {
|
|||
urlBaseWebhook,
|
||||
urlBaseEditor: instanceBaseUrl,
|
||||
versionCli: '',
|
||||
isBetaRelease: config.getEnv('generic.isBetaRelease'),
|
||||
releaseChannel: config.getEnv('generic.releaseChannel'),
|
||||
oauthCallbackUrls: {
|
||||
oauth1: `${instanceBaseUrl}/${this.restEndpoint}/oauth1-credential/callback`,
|
||||
oauth2: `${instanceBaseUrl}/${this.restEndpoint}/oauth2-credential/callback`,
|
||||
|
|
|
@ -432,11 +432,11 @@ export const schema = {
|
|||
default: 'main',
|
||||
},
|
||||
|
||||
isBetaRelease: {
|
||||
doc: 'If it is a beta release',
|
||||
format: 'Boolean',
|
||||
default: false,
|
||||
env: 'IS_BETA_RELEASE',
|
||||
releaseChannel: {
|
||||
doc: 'N8N release channel',
|
||||
format: ['stable', 'beta', 'nightly', 'dev'] as const,
|
||||
default: 'dev',
|
||||
env: 'N8N_RELEASE_TYPE',
|
||||
},
|
||||
},
|
||||
|
||||
|
|
2
packages/editor-ui/public/n8n-dev-logo.svg
Normal file
2
packages/editor-ui/public/n8n-dev-logo.svg
Normal file
|
@ -0,0 +1,2 @@
|
|||
<svg width="240" height="40" viewBox="0 0 240 40" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<g clip-path="url(#a)"><path fill-rule="evenodd" clip-rule="evenodd" d="M78.974 8a8 8 0 0 1-15.748 2h-11.17a4 4 0 0 0-3.945 3.342l-.329 1.973a7.983 7.983 0 0 1-2.6 4.685 7.983 7.983 0 0 1 2.6 4.685l.329 1.973A4 4 0 0 0 52.056 30h3.17a8 8 0 1 1 0 4h-3.17a8 8 0 0 1-7.89-6.685l-.33-1.973A4 4 0 0 0 39.891 22h-3.263a8.004 8.004 0 0 1-15.309 0h-4.691a8 8 0 1 1 .172-4h4.348A8.003 8.003 0 0 1 36.8 18h3.09a4 4 0 0 0 3.946-3.342l.33-1.973A8 8 0 0 1 52.055 6h11.17a8 8 0 0 1 15.748 2zm-4 0a4 4 0 1 1-8 0 4 4 0 0 1 8 0zm-66 15.667a4 4 0 1 0 0-8 4 4 0 0 0 0 8zm20 0a4 4 0 1 0 0-8 4 4 0 0 0 0 8zm34 12.333a4 4 0 1 0 0-8 4 4 0 0 0 0 8z" fill="#838383"/><path d="M86.978 30.001h4.177v-8.843c0-2.904 1.762-4.177 3.753-4.177 1.958 0 3.492 1.305 3.492 3.981v9.039h4.176v-9.887c0-4.275-2.48-6.755-6.363-6.755-2.447 0-3.818.979-4.797 2.251h-.26l-.36-1.925H86.98zm31.585-10.997v-.196c1.436-.718 2.872-1.958 2.872-4.405 0-3.524-2.905-5.645-6.918-5.645-4.112 0-7.049 2.251-7.049 5.71 0 2.35 1.371 3.622 2.872 4.34v.196a5.542 5.542 0 0 0-3.655 5.286c0 3.557 2.937 6.037 7.799 6.037s7.701-2.48 7.701-6.037c0-2.936-1.958-4.666-3.622-5.286zm-4.079-7.244c1.632 0 2.839 1.044 2.839 2.806s-1.24 2.807-2.839 2.807-2.937-1.045-2.937-2.807c0-1.794 1.273-2.806 2.937-2.806zm0 15.435c-1.893 0-3.426-1.208-3.426-3.263 0-1.86 1.272-3.264 3.393-3.264 2.089 0 3.362 1.37 3.362 3.329 0 1.99-1.469 3.198-3.329 3.198zm11.944 2.806h4.177v-8.843c0-2.904 1.762-4.177 3.753-4.177 1.958 0 3.491 1.305 3.491 3.981v9.039h4.177v-9.887c0-4.275-2.48-6.755-6.363-6.755-2.447 0-3.818.979-4.797 2.251h-.261l-.359-1.925h-3.818z" fill="#101330"/></g><rect x="155.216" y="6.657" width="70.5" height="28.5" rx="4.5" fill="#858585"/><defs><clipPath id="a"><path fill="#fff" d="M0 0h143v40H0z"/></clipPath></defs><path d="M183.47 20.765q0 2.597-.688 4.283-.677 1.686-1.847 2.634-1.169.935-2.658 1.317-1.477.381-3.065.381h-4.603V12.322h4.308q1.637 0 3.163.345 1.539.332 2.745 1.243 1.218.898 1.932 2.56.714 1.649.714 4.295zm-4.184 0q0-2.302-.504-3.483-.493-1.182-1.354-1.6-.85-.43-1.92-.43h-.862v11.211h.862q1.12 0 1.969-.48.85-.492 1.33-1.735.48-1.243.48-3.483zm11.139-5.563V19.3h5.907v2.831h-5.907v4.357h7.126v2.892h-11.163V12.322h11.15l-.406 2.88zm15.901 11.028 3.213-13.908h4.135L208.75 29.38h-4.997l-4.899-17.058h4.284z" fill="#fff"/></svg>
|
After Width: | Height: | Size: 2.3 KiB |
2
packages/editor-ui/public/n8n-nightly-logo.svg
Normal file
2
packages/editor-ui/public/n8n-nightly-logo.svg
Normal file
|
@ -0,0 +1,2 @@
|
|||
<svg width="230" height="40" viewBox="0 0 230 40" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<g clip-path="url(#a)"><path fill-rule="evenodd" clip-rule="evenodd" d="M78.974 8a8 8 0 0 1-15.748 2h-11.17a4 4 0 0 0-3.945 3.342l-.329 1.973a7.983 7.983 0 0 1-2.6 4.685 7.983 7.983 0 0 1 2.6 4.685l.329 1.973A4 4 0 0 0 52.056 30h3.17a8 8 0 1 1 0 4h-3.17a8 8 0 0 1-7.89-6.685l-.33-1.973A4 4 0 0 0 39.891 22h-3.263a8.004 8.004 0 0 1-15.309 0h-4.691a8 8 0 1 1 .172-4h4.348A8.003 8.003 0 0 1 36.8 18h3.09a4 4 0 0 0 3.946-3.342l.33-1.973A8 8 0 0 1 52.055 6h11.17a8 8 0 0 1 15.748 2zm-4 0a4 4 0 1 1-8 0 4 4 0 0 1 8 0zm-66 15.667a4 4 0 1 0 0-8 4 4 0 0 0 0 8zm20 0a4 4 0 1 0 0-8 4 4 0 0 0 0 8zm34 12.333a4 4 0 1 0 0-8 4 4 0 0 0 0 8z" fill="#ea4b71"/><path d="M86.978 30.001h4.177v-8.843c0-2.904 1.762-4.177 3.753-4.177 1.958 0 3.492 1.305 3.492 3.981v9.039h4.176v-9.887c0-4.275-2.48-6.755-6.363-6.755-2.447 0-3.818.979-4.797 2.251h-.26l-.36-1.925H86.98zm31.585-10.997v-.196c1.436-.718 2.872-1.958 2.872-4.405 0-3.524-2.905-5.645-6.918-5.645-4.112 0-7.049 2.251-7.049 5.71 0 2.35 1.371 3.622 2.872 4.34v.196a5.542 5.542 0 0 0-3.655 5.286c0 3.557 2.937 6.037 7.799 6.037s7.701-2.48 7.701-6.037c0-2.936-1.958-4.666-3.622-5.286zm-4.079-7.244c1.632 0 2.839 1.044 2.839 2.806s-1.24 2.807-2.839 2.807-2.937-1.045-2.937-2.807c0-1.794 1.273-2.806 2.937-2.806zm0 15.435c-1.893 0-3.426-1.208-3.426-3.263 0-1.86 1.272-3.264 3.393-3.264 2.089 0 3.362 1.37 3.362 3.329 0 1.99-1.469 3.198-3.329 3.198zm11.944 2.806h4.177v-8.843c0-2.904 1.762-4.177 3.753-4.177 1.958 0 3.491 1.305 3.491 3.981v9.039h4.177v-9.887c0-4.275-2.48-6.755-6.363-6.755-2.447 0-3.818.979-4.797 2.251h-.261l-.359-1.925h-3.818z" fill="#101330"/></g><rect x="154" y="12.5" width="65.001" height="19" rx="4.149" fill="#ea4b71"/><defs><clipPath id="a"><path fill="#fff" d="M0 0h143v40H0z"/></clipPath></defs><path d="m162.985 26.312-2.496-7.624q.061.404.143 1.04.082.629.137 1.401.062.773.062 1.607v3.576h-1.908v-9.477h2.797l2.42 7.583q-.11-.65-.226-1.661-.116-1.012-.116-2.291v-3.63h1.908v9.476Zm10.611-9.477v1.641h-1.955v6.188h1.955v1.648h-6.153v-1.648h1.955v-6.188h-1.955v-1.64zm5.477 9.71q-2.017 0-3.084-1.272-1.06-1.279-1.06-3.72 0-1.613.589-2.714.588-1.108 1.586-1.675.998-.568 2.229-.568 1.04 0 1.75.321.711.322 1.265.848l-1.176 1.217q-.43-.383-.827-.567-.397-.185-.903-.185-.636 0-1.135.342-.492.335-.78 1.074-.286.731-.286 1.92 0 1.238.198 1.97.205.732.615 1.053.41.314 1.04.314.335 0 .629-.075.294-.082.547-.212V22.45h-1.19l-.219-1.573h3.528v4.711q-.71.438-1.531.698-.814.26-1.785.26zm9.005-.233v-3.993h-2.297v3.993h-2.243v-9.477h2.243v3.638h2.297v-3.638h2.243v9.477Zm8.164-7.76v7.76h-2.243v-7.76h-2.66v-1.717h7.672l-.232 1.717zm4.266 7.76v-9.477h2.243v7.706h4.11l-.233 1.771Zm12.157-3.555v3.555h-2.242V22.77l-3.09-5.935h2.454l1.798 4.082 1.812-4.082h2.359z" fill="#fff"/></svg>
|
After Width: | Height: | Size: 2.8 KiB |
|
@ -5,19 +5,16 @@
|
|||
<script lang="ts">
|
||||
import { defineComponent } from 'vue';
|
||||
import { mapStores } from 'pinia';
|
||||
import { useRootStore, useSettingsStore } from '@/stores';
|
||||
import { useRootStore, useUIStore } from '@/stores';
|
||||
|
||||
export default defineComponent({
|
||||
computed: {
|
||||
...mapStores(useRootStore, useSettingsStore),
|
||||
...mapStores(useRootStore, useUIStore),
|
||||
basePath(): string {
|
||||
return this.rootStore.baseUrl;
|
||||
},
|
||||
logoPath(): string {
|
||||
return (
|
||||
this.basePath +
|
||||
(this.settingsStore.settings.isBetaRelease ? 'n8n-beta-logo.svg' : 'n8n-logo-expanded.svg')
|
||||
);
|
||||
return this.basePath + this.uiStore.logo;
|
||||
},
|
||||
},
|
||||
});
|
||||
|
|
|
@ -158,13 +158,13 @@ export default defineComponent({
|
|||
logoPath(): string {
|
||||
if (this.isCollapsed) return this.basePath + 'n8n-logo-collapsed.svg';
|
||||
|
||||
return (
|
||||
this.basePath +
|
||||
(this.settingsStore.settings.isBetaRelease ? 'n8n-beta-logo.svg' : 'n8n-logo-expanded.svg')
|
||||
);
|
||||
return this.basePath + this.uiStore.logo;
|
||||
},
|
||||
hasVersionUpdates(): boolean {
|
||||
return !this.settingsStore.settings.isBetaRelease && this.versionsStore.hasVersionUpdates;
|
||||
return (
|
||||
this.settingsStore.settings.releaseChannel === 'stable' &&
|
||||
this.versionsStore.hasVersionUpdates
|
||||
);
|
||||
},
|
||||
nextVersions(): IVersion[] {
|
||||
return this.versionsStore.nextVersions;
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
import type { WorkflowTitleStatus } from '@/Interface';
|
||||
import { useSettingsStore } from '@/stores';
|
||||
|
||||
export function useTitleChange() {
|
||||
const prependBeta = (title: string) => {
|
||||
const settingsStore = useSettingsStore();
|
||||
|
||||
return settingsStore.settings.isBetaRelease ? `[BETA] ${title}` : title;
|
||||
const { releaseChannel } = settingsStore.settings;
|
||||
return releaseChannel === 'stable' ? title : `[${releaseChannel.toUpperCase()}] ${title}`;
|
||||
};
|
||||
|
||||
const titleSet = (workflow: string, status: WorkflowTitleStatus) => {
|
||||
|
|
|
@ -196,6 +196,12 @@ export const useUIStore = defineStore(STORES.UI, {
|
|||
bannerStack: [],
|
||||
}),
|
||||
getters: {
|
||||
logo() {
|
||||
const { releaseChannel } = useSettingsStore().settings;
|
||||
return releaseChannel === 'stable'
|
||||
? 'n8n-logo-expanded.svg'
|
||||
: `n8n-${releaseChannel}-logo.svg`;
|
||||
},
|
||||
contextBasedTranslationKeys() {
|
||||
const settingsStore = useSettingsStore();
|
||||
const deploymentType = settingsStore.deploymentType;
|
||||
|
|
|
@ -2246,7 +2246,7 @@ export interface IN8nUISettings {
|
|||
urlBaseWebhook: string;
|
||||
urlBaseEditor: string;
|
||||
versionCli: string;
|
||||
isBetaRelease: boolean;
|
||||
releaseChannel: 'stable' | 'beta' | 'nightly' | 'dev';
|
||||
n8nMetadata?: {
|
||||
userId?: string;
|
||||
[key: string]: string | number | undefined;
|
||||
|
|
Loading…
Reference in a new issue