2022-08-31 06:25:52 -07:00
|
|
|
name: Docker Base Image CI
|
|
|
|
|
|
|
|
on:
|
|
|
|
workflow_dispatch:
|
|
|
|
inputs:
|
|
|
|
node_version:
|
|
|
|
description: 'Node.js version to build this image with.'
|
2023-06-02 06:23:28 -07:00
|
|
|
type: choice
|
2022-08-31 06:25:52 -07:00
|
|
|
required: true
|
2023-07-12 06:03:23 -07:00
|
|
|
default: '18'
|
2023-06-02 06:23:28 -07:00
|
|
|
options:
|
|
|
|
- '18'
|
2023-07-12 06:03:23 -07:00
|
|
|
- '20'
|
2022-08-31 06:25:52 -07:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2024-01-26 02:26:30 -08:00
|
|
|
- uses: actions/checkout@v4.1.1
|
2022-09-21 01:50:15 -07:00
|
|
|
|
2022-08-31 06:25:52 -07:00
|
|
|
- name: Set up QEMU
|
2024-01-26 02:26:30 -08:00
|
|
|
uses: docker/setup-qemu-action@v3.0.0
|
2022-09-21 01:50:15 -07:00
|
|
|
|
2022-08-31 06:25:52 -07:00
|
|
|
- name: Set up Docker Buildx
|
2024-01-26 02:26:30 -08:00
|
|
|
uses: docker/setup-buildx-action@v3.0.0
|
2022-09-21 01:50:15 -07:00
|
|
|
|
2024-01-26 04:18:49 -08:00
|
|
|
- name: Login to GitHub Container Registry
|
|
|
|
uses: docker/login-action@v3.0.0
|
|
|
|
with:
|
|
|
|
registry: ghcr.io
|
|
|
|
username: ${{ github.actor }}
|
|
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
|
2022-08-31 06:25:52 -07:00
|
|
|
- name: Login to DockerHub
|
2024-01-26 02:26:30 -08:00
|
|
|
uses: docker/login-action@v3.0.0
|
2022-08-31 06:25:52 -07:00
|
|
|
with:
|
|
|
|
username: ${{ secrets.DOCKER_USERNAME }}
|
|
|
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
2022-09-21 01:50:15 -07:00
|
|
|
|
2022-08-31 06:25:52 -07:00
|
|
|
- name: Build
|
2024-01-26 02:26:30 -08:00
|
|
|
uses: docker/build-push-action@v5.1.0
|
2022-08-31 06:25:52 -07:00
|
|
|
with:
|
2024-01-26 04:18:49 -08:00
|
|
|
context: .
|
|
|
|
file: ./docker/images/n8n-base/Dockerfile
|
2022-08-31 06:25:52 -07:00
|
|
|
build-args: |
|
|
|
|
NODE_VERSION=${{github.event.inputs.node_version}}
|
2024-01-26 04:18:49 -08:00
|
|
|
platforms: linux/amd64,linux/arm64
|
2023-03-06 00:53:50 -08:00
|
|
|
provenance: false
|
2022-08-31 06:25:52 -07:00
|
|
|
push: true
|
|
|
|
tags: |
|
|
|
|
${{ secrets.DOCKER_USERNAME }}/base:${{ github.event.inputs.node_version }}
|
2024-01-26 04:18:49 -08:00
|
|
|
ghcr.io/${{ github.repository_owner }}/base:${{ github.event.inputs.node_version }}
|