From 32fbe6f18c1a498e15f99b0e3e1fd01d42e3e432 Mon Sep 17 00:00:00 2001 From: odidev Date: Mon, 1 Nov 2021 16:11:27 +0530 Subject: [PATCH] Release docker image for arm64. Signed-off-by: odidev --- .github/workflows/test.yml | 37 +++++++++++++++++++++++++++++-------- 1 file changed, 29 insertions(+), 8 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 59b9f92..8396193 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -2,17 +2,38 @@ name: Test image build on: pull_request: - branches: [ master ] + push: + branches: + - master + tags: + - v* jobs: - build: - name: Build docker image - + publish: runs-on: ubuntu-latest steps: - - name: Checkout - uses: actions/checkout@v2 + - uses: actions/checkout@v2 + - name: Prepare + id: prepare + run: | + TAG=${GITHUB_REF##*/} + echo ::set-output name=tag_name::${TAG} + - name: Set up QEMU + uses: docker/setup-qemu-action@v1 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v1 + - name: Login do docker.io + run: docker login -u amidos -p ${{ secrets.DOCKER_TOKEN }} + - name: build and publish image + id: docker_build + uses: docker/build-push-action@v2 + with: + context: . + file: ./Dockerfile + platforms: linux/amd64,linux/arm64 + push: true + tags: | + amidos/dcind:${{ steps.prepare.outputs.tag_name }} + amidos/dcind:latest - - name: Build - run: docker build .