2020-12-29 06:00:57 -08:00
|
|
|
name: Docker Nightly Image CI
|
|
|
|
|
|
|
|
on:
|
|
|
|
schedule:
|
2022-02-09 05:23:07 -08:00
|
|
|
- cron: '0 1 * * *'
|
2020-12-29 06:00:57 -08:00
|
|
|
workflow_dispatch:
|
2020-12-29 11:27:48 -08:00
|
|
|
inputs:
|
2022-02-09 05:23:07 -08:00
|
|
|
repository:
|
|
|
|
description: 'GitHub repository to create image off.'
|
|
|
|
required: true
|
|
|
|
default: 'n8n-io/n8n'
|
2020-12-29 11:27:48 -08:00
|
|
|
branch:
|
2022-02-09 05:23:07 -08:00
|
|
|
description: 'GitHub branch to create image off.'
|
2020-12-29 11:27:48 -08:00
|
|
|
required: true
|
|
|
|
default: 'master'
|
|
|
|
tag:
|
|
|
|
description: 'Name of the docker tag to create.'
|
|
|
|
required: true
|
|
|
|
default: 'nightly'
|
2022-02-10 05:14:55 -08:00
|
|
|
merge-master:
|
|
|
|
description: 'Merge with master.'
|
|
|
|
type: boolean
|
|
|
|
required: true
|
|
|
|
default: false
|
2022-02-25 10:39:35 -08:00
|
|
|
success-url:
|
|
|
|
description: 'URL to call after Docker Image got built successfully.'
|
|
|
|
required: false
|
|
|
|
default: ''
|
2020-12-29 06:00:57 -08:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
2022-02-09 05:23:07 -08:00
|
|
|
- name: Checkout
|
2020-12-29 06:00:57 -08:00
|
|
|
uses: actions/checkout@v2
|
2020-12-29 11:27:48 -08:00
|
|
|
with:
|
2022-02-12 03:37:53 -08:00
|
|
|
repository: ${{ github.event.inputs.repository || 'n8n-io/n8n' }}
|
2020-12-31 03:17:00 -08:00
|
|
|
ref: ${{ github.event.inputs.branch || 'master' }}
|
2022-02-09 05:23:07 -08:00
|
|
|
- name: Set up QEMU
|
2020-12-29 06:00:57 -08:00
|
|
|
uses: docker/setup-qemu-action@v1
|
2022-02-09 05:23:07 -08:00
|
|
|
- name: Set up Docker Buildx
|
2020-12-29 06:00:57 -08:00
|
|
|
uses: docker/setup-buildx-action@v1
|
2022-02-09 05:23:07 -08:00
|
|
|
- name: Login to DockerHub
|
2020-12-29 06:00:57 -08:00
|
|
|
uses: docker/login-action@v1
|
|
|
|
with:
|
|
|
|
username: ${{ secrets.DOCKER_USERNAME }}
|
|
|
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
2022-02-10 05:14:55 -08:00
|
|
|
- name: Merge Master - optionally
|
|
|
|
run: |
|
2022-02-10 05:41:42 -08:00
|
|
|
[[ "${{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 ""
|
2022-02-10 05:14:55 -08:00
|
|
|
shell: bash
|
2022-02-09 05:23:07 -08:00
|
|
|
- name: Build and push
|
2020-12-29 06:00:57 -08:00
|
|
|
uses: docker/build-push-action@v2
|
|
|
|
with:
|
|
|
|
context: .
|
|
|
|
file: ./docker/images/n8n-custom/Dockerfile
|
|
|
|
platforms: linux/amd64
|
|
|
|
push: true
|
2020-12-31 03:17:00 -08:00
|
|
|
tags: n8nio/n8n:${{ github.event.inputs.tag || 'nightly' }}
|
2022-07-04 04:56:52 -07:00
|
|
|
no-cache: true
|
2022-02-25 10:39:35 -08:00
|
|
|
- name: Call Success URL - optionally
|
|
|
|
run: |
|
2022-02-25 10:58:35 -08:00
|
|
|
[[ "${{github.event.inputs.success-url}}" != "" ]] && curl -v ${{github.event.inputs.success-url}} || echo ""
|
2022-02-25 10:39:35 -08:00
|
|
|
shell: bash
|