🐳 Extend nightly build action to also allow to build from other

repository
This commit is contained in:
Jan Oberhauser 2022-02-09 14:23:07 +01:00
parent 0799ff24b2
commit b4fb5947dc

View file

@ -2,11 +2,15 @@ name: Docker Nightly Image CI
on: on:
schedule: schedule:
- cron: "0 1 * * *" - cron: '0 1 * * *'
workflow_dispatch: workflow_dispatch:
inputs: inputs:
repository:
description: 'GitHub repository to create image off.'
required: true
default: 'n8n-io/n8n'
branch: branch:
description: 'Name of the GitHub branch to create image off.' description: 'GitHub branch to create image off.'
required: true required: true
default: 'master' default: 'master'
tag: tag:
@ -15,31 +19,25 @@ on:
default: 'nightly' default: 'nightly'
jobs: jobs:
build: build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- - name: Checkout
name: Checkout
uses: actions/checkout@v2 uses: actions/checkout@v2
with: with:
name: ${{ github.event.inputs.repository || 'n8n-io/n8n' }}
ref: ${{ github.event.inputs.branch || 'master' }} ref: ${{ github.event.inputs.branch || 'master' }}
- - name: Set up QEMU
name: Set up QEMU
uses: docker/setup-qemu-action@v1 uses: docker/setup-qemu-action@v1
- - name: Set up Docker Buildx
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1 uses: docker/setup-buildx-action@v1
- - name: Login to DockerHub
name: Login to DockerHub
uses: docker/login-action@v1 uses: docker/login-action@v1
with: with:
username: ${{ secrets.DOCKER_USERNAME }} username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }} password: ${{ secrets.DOCKER_PASSWORD }}
- - name: Build and push
name: Build and push
uses: docker/build-push-action@v2 uses: docker/build-push-action@v2
with: with:
context: . context: .