From d1319c6c29214ab5764556b079f37577fc7f0fb6 Mon Sep 17 00:00:00 2001 From: Jan Date: Thu, 2 Jan 2020 13:05:51 -0600 Subject: [PATCH] :construction_worker: Automatically build docker images --- .github/workflows/docker-images.yml | 32 +++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/docker-images.yml diff --git a/.github/workflows/docker-images.yml b/.github/workflows/docker-images.yml new file mode 100644 index 0000000000..d1cca04650 --- /dev/null +++ b/.github/workflows/docker-images.yml @@ -0,0 +1,32 @@ +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 registry + uses: actions/docker/login@master + env: + DOCKER_REGISTRY_URL: registry.hub.docker.com + DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} + DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} + - name: Build the Docker image of version + run: docker build --build-arg N8N_VERSION=${{steps.vars.outputs.tag}} -t n8nio/n8n:${{steps.vars.outputs.tag}} docker/images/n8n + - name: Push Docker image of version + run: docker push n8nio/n8n:${{steps.vars.outputs.tag}} + - name: Tag Docker image with latest + run: docker tag n8nio/n8n:${{steps.vars.outputs.tag}} n8nio/n8n:latest + - name: Push docker images of latest + run: docker push n8nio/n8n:latest