diff --git a/.editorconfig b/.editorconfig index 5ab90f90d7..b6b59f3ccf 100644 --- a/.editorconfig +++ b/.editorconfig @@ -14,3 +14,7 @@ indent_size = 2 [*.ts] quote_type = single + +[*.yml] +indent_style = space +indent_size = 2 diff --git a/.github/workflows/docker-images-rpi.yml b/.github/workflows/docker-images-rpi.yml deleted file mode 100644 index 1eeb66ecdb..0000000000 --- a/.github/workflows/docker-images-rpi.yml +++ /dev/null @@ -1,40 +0,0 @@ -name: Docker Image CI - Rpi - -on: - push: - tags: - - n8n@* - workflow_dispatch: - inputs: - version: - description: 'n8n version to build docker image for.' - required: true - default: '0.112.0' - -jobs: - armv7_job: - runs-on: ubuntu-18.04 - name: Build on ARMv7 (Rpi) - steps: - - uses: actions/checkout@v1 - - name: Get the version - id: vars - run: echo ::set-output name=tag::$(echo ${GITHUB_REF:14}) - - - name: Log in to Docker registry - run: docker login -u ${{ secrets.DOCKER_USERNAME }} -p ${{ secrets.DOCKER_PASSWORD }} - - - name: Set up Docker Buildx - uses: crazy-max/ghaction-docker-buildx@v3 - with: - buildx-version: latest - qemu-version: latest - - name: Run Buildx (push image) - if: success() - run: | - docker buildx build \ - --platform linux/arm/v7 \ - --build-arg N8N_VERSION=${{github.event.inputs.version || steps.vars.outputs.tag}} \ - -t ${{ secrets.DOCKER_USERNAME }}/n8n:${{github.event.inputs.version || steps.vars.outputs.tag}}-rpi \ - -t ${{ secrets.DOCKER_USERNAME }}/n8n:latest-rpi \ - --output type=image,push=true docker/images/n8n-rpi diff --git a/.github/workflows/docker-images.yml b/.github/workflows/docker-images.yml index 1a9b81d09f..8b9e32e0bf 100644 --- a/.github/workflows/docker-images.yml +++ b/.github/workflows/docker-images.yml @@ -6,33 +6,41 @@ on: - n8n@* jobs: - build: - runs-on: ubuntu-latest - steps: - uses: actions/checkout@v1 - name: Get the version id: vars run: echo ::set-output name=tag::$(echo ${GITHUB_REF:14}) - - name: Log in to Docker registry - run: docker login -u ${{ secrets.DOCKER_USERNAME }} -p ${{ secrets.DOCKER_PASSWORD }} - - - name: Build the Docker image of version - run: docker build --build-arg N8N_VERSION=${{steps.vars.outputs.tag}} -t n8nio/n8n:${{steps.vars.outputs.tag}} docker/images/n8n - - name: Push Docker image of version - run: docker push n8nio/n8n:${{steps.vars.outputs.tag}} - - name: Tag Docker image with latest - run: docker tag n8nio/n8n:${{steps.vars.outputs.tag}} n8nio/n8n:latest - - name: Push docker images of latest - run: docker push n8nio/n8n:latest - - - name: Build the Docker image of version (Debian) - run: docker build --build-arg N8N_VERSION=${{steps.vars.outputs.tag}} -t n8nio/n8n:${{steps.vars.outputs.tag}}-debian docker/images/n8n-debian - - name: Push Docker image of version (Debian) - run: docker push n8nio/n8n:${{steps.vars.outputs.tag}}-debian - - name: Tag Docker image with latest (Debian) - run: docker tag n8nio/n8n:${{steps.vars.outputs.tag}}-debian n8nio/n8n:latest-debian - - name: Push docker images of latest (Debian) - run: docker push n8nio/n8n:latest-debian + - name: Set up QEMU + uses: docker/setup-qemu-action@v1 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v1 + - name: Login to DockerHub + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + - name: Build + uses: docker/build-push-action@v2 + with: + context: ./docker/images/n8n + build-args: | + N8N_VERSION=${{steps.vars.outputs.tag}} + platforms: linux/amd64,linux/arm64,linux/arm/v7 + push: true + tags: | + ${{ secrets.DOCKER_USERNAME }}/n8n:${{ steps.vars.outputs.tag }} + ${{ secrets.DOCKER_USERNAME }}/n8n:latest + - name: Build (debian) + uses: docker/build-push-action@v2 + with: + context: ./docker/images/n8n-debian + build-args: | + N8N_VERSION=${{ steps.vars.outputs.tag }} + platforms: linux/amd64,linux/arm64,linux/arm/v7 + push: true + tags: | + ${{ secrets.DOCKER_USERNAME }}/n8n:${{ steps.vars.outputs.tag }}-debian + ${{ secrets.DOCKER_USERNAME }}/n8n:latest-debian diff --git a/docker/images/n8n-rpi/Dockerfile b/docker/images/n8n-rpi/Dockerfile deleted file mode 100644 index 8a3f94838e..0000000000 --- a/docker/images/n8n-rpi/Dockerfile +++ /dev/null @@ -1,21 +0,0 @@ -FROM arm32v7/node:14.15 - -ARG N8N_VERSION - -RUN if [ -z "$N8N_VERSION" ] ; then echo "The N8N_VERSION argument is missing!" ; exit 1; fi - -RUN \ - apt-get update && \ - apt-get -y install graphicsmagick gosu git - -RUN npm_config_user=root npm install -g full-icu n8n@${N8N_VERSION} - -ENV NODE_ICU_DATA /usr/local/lib/node_modules/full-icu -ENV NODE_ENV production - -WORKDIR /data - -USER root - -CMD chown -R node:node /home/node/.n8n \ -&& gosu node n8n diff --git a/docker/images/n8n-rpi/README.md b/docker/images/n8n-rpi/README.md deleted file mode 100644 index cc15b0c9d8..0000000000 --- a/docker/images/n8n-rpi/README.md +++ /dev/null @@ -1,22 +0,0 @@ -## n8n - Raspberry PI Docker Image - -Dockerfile to build n8n for Raspberry PI. - -For information about how to run n8n with Docker check the generic -[Docker-Readme](https://github.com/n8n-io/n8n/tree/master/docker/images/n8n/README.md) - - -``` -docker build --build-arg N8N_VERSION= -t n8nio/n8n: . - -# For example: -docker build --build-arg N8N_VERSION=0.43.0 -t n8nio/n8n:0.43.0-rpi . -``` - -``` -docker run -it --rm \ - --name n8n \ - -p 5678:5678 \ - -v ~/.n8n:/home/node/.n8n \ - n8nio/n8n:0.70.0-rpi -``` diff --git a/docker/images/n8n/README.md b/docker/images/n8n/README.md index cb484addb0..7e6b5812b0 100644 --- a/docker/images/n8n/README.md +++ b/docker/images/n8n/README.md @@ -227,10 +227,10 @@ docker run -it --rm \ ## Build Docker-Image ``` -docker build --build-arg N8N_VERSION= -t n8nio/n8n: . +docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 --build-arg N8N_VERSION= -t n8nio/n8n: . # For example: -docker build --build-arg N8N_VERSION=0.18.1 -t n8nio/n8n:0.18.1 . +docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 --build-arg N8N_VERSION=0.114.0 -t n8nio/n8n:0.114.0 . ```