Skip to content

Commit c6b491c

Browse files
authored
ci: Stop publishing custom images to docker hub by default (#12516)
1 parent ba6a2f8 commit c6b491c

File tree

6 files changed

+123
-84
lines changed

6 files changed

+123
-84
lines changed

.github/workflows/docker-base-image.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,26 +20,28 @@ jobs:
2020
- uses: actions/checkout@v4.1.1
2121

2222
- name: Set up QEMU
23-
uses: docker/setup-qemu-action@v3.0.0
23+
uses: docker/setup-qemu-action@v3.3.0
2424

2525
- name: Set up Docker Buildx
26-
uses: docker/setup-buildx-action@v3.0.0
26+
uses: docker/setup-buildx-action@v3.8.0
2727

2828
- name: Login to GitHub Container Registry
29-
uses: docker/login-action@v3.0.0
29+
uses: docker/login-action@v3.3.0
3030
with:
3131
registry: ghcr.io
3232
username: ${{ github.actor }}
3333
password: ${{ secrets.GITHUB_TOKEN }}
3434

3535
- name: Login to DockerHub
36-
uses: docker/login-action@v3.0.0
36+
uses: docker/login-action@v3.3.0
3737
with:
3838
username: ${{ secrets.DOCKER_USERNAME }}
3939
password: ${{ secrets.DOCKER_PASSWORD }}
4040

4141
- name: Build
42-
uses: docker/build-push-action@v5.1.0
42+
uses: docker/build-push-action@v6.11.0
43+
env:
44+
DOCKER_BUILD_SUMMARY: false
4345
with:
4446
context: .
4547
file: ./docker/images/n8n-base/Dockerfile

.github/workflows/docker-images-benchmark.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,20 +19,22 @@ jobs:
1919
- uses: actions/checkout@v4.1.1
2020

2121
- name: Set up QEMU
22-
uses: docker/setup-qemu-action@v3.0.0
22+
uses: docker/setup-qemu-action@v3.3.0
2323

2424
- name: Set up Docker Buildx
25-
uses: docker/setup-buildx-action@v3.0.0
25+
uses: docker/setup-buildx-action@v3.8.0
2626

2727
- name: Login to GitHub Container Registry
28-
uses: docker/login-action@v3.0.0
28+
uses: docker/login-action@v3.3.0
2929
with:
3030
registry: ghcr.io
3131
username: ${{ github.actor }}
3232
password: ${{ secrets.GITHUB_TOKEN }}
3333

3434
- name: Build
35-
uses: docker/build-push-action@v5.1.0
35+
uses: docker/build-push-action@v6.11.0
36+
env:
37+
DOCKER_BUILD_SUMMARY: false
3638
with:
3739
context: .
3840
file: ./packages/@n8n/benchmark/Dockerfile
Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
name: Docker Custom Image CI
2+
run-name: Build ${{ inputs.branch }} - ${{ inputs.user }}
3+
4+
on:
5+
workflow_dispatch:
6+
inputs:
7+
branch:
8+
description: 'GitHub branch to create image off.'
9+
required: true
10+
tag:
11+
description: 'Name of the docker tag to create.'
12+
required: true
13+
merge-master:
14+
description: 'Merge with master.'
15+
type: boolean
16+
required: true
17+
default: false
18+
user:
19+
description: ''
20+
required: false
21+
default: 'none'
22+
start-url:
23+
description: 'URL to call after workflow is kicked off.'
24+
required: false
25+
default: ''
26+
success-url:
27+
description: 'URL to call after Docker Image got built successfully.'
28+
required: false
29+
default: ''
30+
31+
jobs:
32+
build:
33+
runs-on: ubuntu-latest
34+
35+
steps:
36+
- name: Call Start URL - optionally
37+
if: ${{ github.event.inputs.start-url != '' }}
38+
run: curl -v -X POST -d 'url=${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}' ${{github.event.inputs.start-url}} || echo ""
39+
shell: bash
40+
41+
- name: Checkout
42+
uses: actions/checkout@v4.1.1
43+
with:
44+
ref: ${{ github.event.inputs.branch }}
45+
46+
- name: Merge Master - optionally
47+
if: github.event.inputs.merge-master
48+
run: git remote add upstream https://github.com/n8n-io/n8n.git -f; git merge upstream/master --allow-unrelated-histories || echo ""
49+
shell: bash
50+
51+
- name: Set up QEMU
52+
uses: docker/setup-qemu-action@v3.3.0
53+
54+
- name: Set up Docker Buildx
55+
uses: docker/setup-buildx-action@v3.8.0
56+
57+
- name: Login to GHCR
58+
uses: docker/login-action@v3.3.0
59+
with:
60+
registry: ghcr.io
61+
username: ${{ github.actor }}
62+
password: ${{ secrets.GITHUB_TOKEN }}
63+
64+
- name: Build and push image to GHCR
65+
uses: docker/build-push-action@v6.11.0
66+
env:
67+
DOCKER_BUILD_SUMMARY: false
68+
with:
69+
context: .
70+
file: ./docker/images/n8n-custom/Dockerfile
71+
build-args: |
72+
N8N_RELEASE_TYPE=development
73+
platforms: linux/amd64
74+
provenance: false
75+
push: true
76+
cache-from: type=gha
77+
cache-to: type=gha,mode=max
78+
tags: ghcr.io/${{ github.repository_owner }}/n8n:${{ inputs.tag }}
79+
80+
- name: Call Success URL - optionally
81+
if: ${{ github.event.inputs.success-url != '' }}
82+
run: curl -v ${{github.event.inputs.success-url}} || echo ""
83+
shell: bash
Lines changed: 18 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -1,74 +1,42 @@
11
name: Docker Nightly Image CI
2-
run-name: Build ${{ inputs.branch }} - ${{ inputs.user }}
32

43
on:
54
schedule:
6-
- cron: '0 1 * * *'
5+
- cron: '0 0 * * *'
76
workflow_dispatch:
8-
inputs:
9-
branch:
10-
description: 'GitHub branch to create image off.'
11-
required: true
12-
default: 'master'
13-
tag:
14-
description: 'Name of the docker tag to create.'
15-
required: true
16-
default: 'nightly'
17-
merge-master:
18-
description: 'Merge with master.'
19-
type: boolean
20-
required: true
21-
default: false
22-
user:
23-
description: ''
24-
required: false
25-
default: 'schedule'
26-
start-url:
27-
description: 'URL to call after workflow is kicked off.'
28-
required: false
29-
default: ''
30-
success-url:
31-
description: 'URL to call after Docker Image got built successfully.'
32-
required: false
33-
default: ''
34-
35-
env:
36-
N8N_TAG: ${{ inputs.tag || 'nightly' }}
377

388
jobs:
399
build:
4010
runs-on: ubuntu-latest
41-
4211
steps:
43-
- name: Call Start URL - optionally
44-
run: |
45-
[[ "${{github.event.inputs.start-url}}" != "" ]] && curl -v -X POST -d 'url=${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}' ${{github.event.inputs.start-url}} || echo ""
46-
shell: bash
47-
4812
- name: Checkout
4913
uses: actions/checkout@v4.1.1
5014
with:
51-
ref: ${{ github.event.inputs.branch || 'master' }}
15+
ref: master
5216

5317
- name: Set up QEMU
54-
uses: docker/setup-qemu-action@v3.0.0
18+
uses: docker/setup-qemu-action@v3.3.0
5519

5620
- name: Set up Docker Buildx
57-
uses: docker/setup-buildx-action@v3.0.0
21+
uses: docker/setup-buildx-action@v3.8.0
22+
23+
- name: Login to GHCR
24+
uses: docker/login-action@v3.3.0
25+
with:
26+
registry: ghcr.io
27+
username: ${{ github.actor }}
28+
password: ${{ secrets.GITHUB_TOKEN }}
5829

5930
- name: Login to DockerHub
60-
uses: docker/login-action@v3.0.0
31+
uses: docker/login-action@v3.3.0
6132
with:
6233
username: ${{ secrets.DOCKER_USERNAME }}
6334
password: ${{ secrets.DOCKER_PASSWORD }}
6435

65-
- name: Merge Master - optionally
66-
run: |
67-
[[ "${{github.event.inputs.merge-master}}" == "true" ]] && git remote add upstream https://github.com/n8n-io/n8n.git -f; git merge upstream/master --allow-unrelated-histories || echo ""
68-
shell: bash
69-
70-
- name: Build and push to DockerHub
71-
uses: docker/build-push-action@v5.1.0
36+
- name: Build and push image to GHCR and DockerHub
37+
uses: docker/build-push-action@v6.11.0
38+
env:
39+
DOCKER_BUILD_SUMMARY: false
7240
with:
7341
context: .
7442
file: ./docker/images/n8n-custom/Dockerfile
@@ -79,24 +47,6 @@ jobs:
7947
push: true
8048
cache-from: type=gha
8149
cache-to: type=gha,mode=max
82-
tags: ${{ secrets.DOCKER_USERNAME }}/n8n:${{ env.N8N_TAG }}
83-
84-
- name: Login to GitHub Container Registry
85-
if: env.N8N_TAG == 'nightly'
86-
uses: docker/login-action@v3.0.0
87-
with:
88-
registry: ghcr.io
89-
username: ${{ github.actor }}
90-
password: ${{ secrets.GITHUB_TOKEN }}
91-
92-
- name: Push image to GHCR
93-
if: env.N8N_TAG == 'nightly'
94-
run: |
95-
docker buildx imagetools create \
96-
--tag ghcr.io/${{ github.repository_owner }}/n8n:nightly \
50+
tags: |
51+
ghcr.io/${{ github.repository_owner }}/n8n:nightly
9752
${{ secrets.DOCKER_USERNAME }}/n8n:nightly
98-
99-
- name: Call Success URL - optionally
100-
run: |
101-
[[ "${{github.event.inputs.success-url}}" != "" ]] && curl -v ${{github.event.inputs.success-url}} || echo ""
102-
shell: bash

.github/workflows/release-publish.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -73,26 +73,28 @@ jobs:
7373
fetch-depth: 0
7474

7575
- name: Set up QEMU
76-
uses: docker/setup-qemu-action@v3.0.0
76+
uses: docker/setup-qemu-action@v3.3.0
7777

7878
- name: Set up Docker Buildx
79-
uses: docker/setup-buildx-action@v3.0.0
79+
uses: docker/setup-buildx-action@v3.8.0
8080

8181
- name: Login to GitHub Container Registry
82-
uses: docker/login-action@v3.0.0
82+
uses: docker/login-action@v3.3.0
8383
with:
8484
registry: ghcr.io
8585
username: ${{ github.actor }}
8686
password: ${{ secrets.GITHUB_TOKEN }}
8787

8888
- name: Login to DockerHub
89-
uses: docker/login-action@v3.0.0
89+
uses: docker/login-action@v3.3.0
9090
with:
9191
username: ${{ secrets.DOCKER_USERNAME }}
9292
password: ${{ secrets.DOCKER_PASSWORD }}
9393

9494
- name: Build
95-
uses: docker/build-push-action@v5.1.0
95+
uses: docker/build-push-action@v6.11.0
96+
env:
97+
DOCKER_BUILD_SUMMARY: false
9698
with:
9799
context: ./docker/images/n8n
98100
build-args: |

.github/workflows/release-push-to-channel.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
runs-on: ubuntu-latest
3535
timeout-minutes: 5
3636
steps:
37-
- uses: docker/login-action@v3.0.0
37+
- uses: docker/login-action@v3.3.0
3838
with:
3939
username: ${{ secrets.DOCKER_USERNAME }}
4040
password: ${{ secrets.DOCKER_PASSWORD }}
@@ -46,7 +46,7 @@ jobs:
4646
runs-on: ubuntu-latest
4747
timeout-minutes: 5
4848
steps:
49-
- uses: docker/login-action@v3.0.0
49+
- uses: docker/login-action@v3.3.0
5050
with:
5151
registry: ghcr.io
5252
username: ${{ github.actor }}

0 commit comments

Comments
 (0)