refactor(core): Rebuild docker infrastructure (#8451)

This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™
2024-01-26 13:18:49 +01:00
committed by GitHub
parent fc5c562785
commit 1db35c18e9
11 changed files with 75 additions and 100 deletions

View File

@@ -9,7 +9,6 @@ on:
required: true
default: '18'
options:
- '16'
- '18'
- '20'
@@ -25,6 +24,13 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3.0.0
- name: Login to GitHub Container Registry
uses: docker/login-action@v3.0.0
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Login to DockerHub
uses: docker/login-action@v3.0.0
with:
@@ -34,11 +40,13 @@ jobs:
- name: Build
uses: docker/build-push-action@v5.1.0
with:
context: ./docker/images/n8n-base
context: .
file: ./docker/images/n8n-base/Dockerfile
build-args: |
NODE_VERSION=${{github.event.inputs.node_version}}
platforms: linux/amd64,linux/arm64,linux/arm/v7
platforms: linux/amd64,linux/arm64
provenance: false
push: true
tags: |
${{ secrets.DOCKER_USERNAME }}/base:${{ github.event.inputs.node_version }}
ghcr.io/${{ github.repository_owner }}/base:${{ github.event.inputs.node_version }}

View File

@@ -1,44 +0,0 @@
name: Docker Image - Beta
on:
workflow_dispatch:
inputs:
branch:
description: 'Branch to create image off.'
required: true
default: 'ai-beta'
tag:
description: 'Name of the docker tag to create.'
required: true
default: 'ai-beta'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4.1.1
with:
fetch-depth: 0
ref: ${{ github.event.inputs.branch || 'ai-beta' }}
- uses: docker/setup-qemu-action@v3.0.0
- uses: docker/setup-buildx-action@v3.0.0
- name: Login to DockerHub
uses: docker/login-action@v3.0.0
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build and push
uses: docker/build-push-action@v5.1.0
with:
context: .
file: ./docker/images/n8n-custom/Dockerfile
build-args: |
N8N_RELEASE_TYPE=beta
platforms: linux/amd64,linux/arm64
provenance: false
push: true
tags: ${{ secrets.DOCKER_USERNAME }}/n8n:${{ github.event.inputs.tag || 'ai-beta' }}
no-cache: true

View File

@@ -35,11 +35,6 @@ on:
description: 'URL to call after Docker Image got built successfully.'
required: false
default: ''
include-arm64:
description: 'Include ARM64 support'
type: boolean
required: true
default: false
jobs:
build:
@@ -78,14 +73,15 @@ jobs:
uses: docker/build-push-action@v5.1.0
with:
context: .
file: ./docker/images/n8n-custom/Dockerfile
build-args: |
N8N_RELEASE_TYPE=nightly
file: ./docker/images/n8n-custom/Dockerfile
platforms: ${{ github.event.inputs.include-arm64 == 'true' && 'linux/amd64,linux/arm64' || 'linux/amd64' }}
platforms: linux/amd64,linux/arm64
provenance: false
push: true
cache-from: type=gha
cache-to: type=gha,mode=max
tags: ${{ secrets.DOCKER_USERNAME }}/n8n:${{ github.event.inputs.tag || 'nightly' }}
no-cache: true
- name: Call Success URL - optionally
run: |

View File

@@ -40,7 +40,7 @@ jobs:
context: ./docker/images/n8n
build-args: |
N8N_VERSION=${{ steps.vars.outputs.tag }}
platforms: linux/amd64,linux/arm64,linux/arm/v7
platforms: linux/amd64,linux/arm64
provenance: false
push: true
tags: |