name: Docker Image CI on: push: tags: - 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 Docker Buildx uses: crazy-max/ghaction-docker-buildx@v3 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