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
|
|
|
|
2020-01-02 11:05:51 -08:00
|
|
|
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-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
|
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-19 06:34:02 -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
|
|
|
|
2023-01-24 06:36:58 -08:00
|
|
|
- name: Login to GitHub Container Registry
|
2024-01-26 02:26:30 -08:00
|
|
|
uses: docker/login-action@v3.0.0
|
2023-01-24 06:36:58 -08:00
|
|
|
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
|
2024-01-26 02:26:30 -08:00
|
|
|
uses: docker/login-action@v3.0.0
|
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
|
2024-01-26 02:26:30 -08:00
|
|
|
uses: docker/build-push-action@v5.1.0
|
2022-08-19 06:34:02 -07:00
|
|
|
with:
|
2023-06-07 04:28:06 -07:00
|
|
|
context: ./docker/images/n8n
|
2022-08-19 06:34:02 -07:00
|
|
|
build-args: |
|
|
|
|
N8N_VERSION=${{ steps.vars.outputs.tag }}
|
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-19 06:34:02 -07:00
|
|
|
push: true
|
|
|
|
tags: |
|
2023-06-07 04:28:06 -07:00
|
|
|
${{ secrets.DOCKER_USERNAME }}/n8n:${{ steps.vars.outputs.tag }}
|
|
|
|
ghcr.io/${{ github.repository_owner }}/n8n:${{ steps.vars.outputs.tag }}
|