fix: workflow

Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
This commit is contained in:
Carlos Alexandro Becker 2021-04-05 10:22:04 -03:00
parent 4d3ff091aa
commit 061e990d87

View file

@ -6,40 +6,41 @@ on:
- n8n@*
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Get the version
id: vars
run: echo ::set-output name=tag::$(echo ${GITHUB_REF:14})
- name: Log in to Docker registry
run: docker login -u ${{ secrets.DOCKER_USERNAME }} -p ${{ secrets.DOCKER_PASSWORD }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: crazy-max/ghaction-docker-buildx@v3
uses: docker/setup-buildx-action@v1
- name: Login to DockerHub
uses: docker/login-action@v1
with:
buildx-version: latest
qemu-version: latest
- name: Build the Docker image of version
if: success()
run: |
docker buildx build \
--platform linux/amd64,linux/arm64,linux/arm/v7 \
--build-arg N8N_VERSION=${{steps.vars.outputs.tag}} \
-t ${{ secrets.DOCKER_USERNAME }}/n8n:${{steps.vars.outputs.tag}} \
-t ${{ secrets.DOCKER_USERNAME }}/n8n:latest \
--output type=image,push=true docker/images/n8n
- name: Build the Docker image of version (Debian)
run: |
docker buildx build \
--platform linux/amd64 \
--build-arg N8N_VERSION=${{steps.vars.outputs.tag}} \
-t ${{ secrets.DOCKER_USERNAME }}/n8n:${{steps.vars.outputs.tag}}-debian \
-t ${{ secrets.DOCKER_USERNAME }}/n8n:latest-debian \
--output type=image,push=true docker/images/n8n-debian
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build
uses: docker/build-push-action@v2
with:
context: ./docker/images/n8n
build-args: |
N8N_VERSION=${{steps.vars.outputs.tag}}
platforms: linux/amd64,linux/arm64,linux/arm/v7
push: true
tags: |
${{ secrets.DOCKER_USERNAME }}/n8n:${{ steps.vars.outputs.tag }}
${{ secrets.DOCKER_USERNAME }}/n8n:latest
- name: Build (debian)
uses: docker/build-push-action@v2
with:
context: ./docker/images/n8n-debian
build-args: |
N8N_VERSION=${{ steps.vars.outputs.tag }}
platforms: linux/amd64,linux/arm64,linux/arm/v7
push: true
tags: |
${{ secrets.DOCKER_USERNAME }}/n8n:${{ steps.vars.outputs.tag }}-debian
${{ secrets.DOCKER_USERNAME }}/n8n:latest-debian