2020-01-02 11:05:51 -08:00
|
|
|
name: Docker Image CI
|
|
|
|
|
|
|
|
on:
|
2023-02-21 07:02:31 -08:00
|
|
|
release:
|
|
|
|
types: [published]
|
2020-01-02 11:05:51 -08:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
2022-12-06 08:26:53 -08:00
|
|
|
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
docker-context: ['', '-debian']
|
|
|
|
|
2020-01-02 11:05:51 -08:00
|
|
|
steps:
|
2022-09-21 01:50:15 -07:00
|
|
|
- uses: actions/checkout@v3
|
|
|
|
|
2022-08-19 06:34:02 -07:00
|
|
|
- name: Get the version
|
|
|
|
id: vars
|
|
|
|
run: echo ::set-output name=tag::$(echo ${GITHUB_REF:14})
|
2022-09-21 01:50:15 -07:00
|
|
|
|
2022-08-19 06:34:02 -07:00
|
|
|
- name: Set up QEMU
|
2022-09-21 01:50:15 -07:00
|
|
|
uses: docker/setup-qemu-action@v2
|
|
|
|
|
2022-08-19 06:34:02 -07:00
|
|
|
- name: Set up Docker Buildx
|
2022-09-21 01:50:15 -07:00
|
|
|
uses: docker/setup-buildx-action@v2
|
|
|
|
|
2023-01-24 06:36:58 -08:00
|
|
|
- name: Login to GitHub Container Registry
|
|
|
|
uses: docker/login-action@v2
|
|
|
|
with:
|
2023-01-27 01:18:15 -08:00
|
|
|
registry: ghcr.io
|
|
|
|
username: ${{ github.actor }}
|
|
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
2023-01-24 06:36:58 -08:00
|
|
|
|
2022-08-19 06:34:02 -07:00
|
|
|
- name: Login to DockerHub
|
2022-09-21 01:50:15 -07:00
|
|
|
uses: docker/login-action@v2
|
2022-08-19 06:34:02 -07:00
|
|
|
with:
|
|
|
|
username: ${{ secrets.DOCKER_USERNAME }}
|
|
|
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
2022-09-21 01:50:15 -07:00
|
|
|
|
2022-08-19 06:34:02 -07:00
|
|
|
- name: Build
|
2023-03-06 00:53:50 -08:00
|
|
|
uses: docker/build-push-action@v4
|
2022-08-19 06:34:02 -07:00
|
|
|
with:
|
2022-12-06 08:26:53 -08:00
|
|
|
context: ./docker/images/n8n${{ matrix.docker-context }}
|
2022-08-19 06:34:02 -07:00
|
|
|
build-args: |
|
|
|
|
N8N_VERSION=${{ steps.vars.outputs.tag }}
|
2022-12-07 03:42:52 -08:00
|
|
|
platforms: linux/amd64,linux/arm64,linux/arm/v7
|
2023-03-06 00:53:50 -08:00
|
|
|
provenance: false
|
2022-08-19 06:34:02 -07:00
|
|
|
push: true
|
|
|
|
tags: |
|
2022-12-06 08:26:53 -08:00
|
|
|
${{ secrets.DOCKER_USERNAME }}/n8n:${{ steps.vars.outputs.tag }}${{ matrix.docker-context }}
|
|
|
|
${{ secrets.DOCKER_USERNAME }}/n8n:latest${{ matrix.docker-context }}
|
2023-01-24 06:36:58 -08:00
|
|
|
ghcr.io/${{ github.repository_owner }}/n8n:${{ steps.vars.outputs.tag }}${{ matrix.docker-context }}
|
|
|
|
ghcr.io/${{ github.repository_owner }}/n8n:latest${{ matrix.docker-context }}
|