From ed1335869b5edd9975aea0017467a005e8db0ca2 Mon Sep 17 00:00:00 2001 From: Ashish Tiwari Date: Mon, 4 Dec 2023 13:58:36 +0530 Subject: [PATCH 1/3] ci: add workflow to push docker image Signed-off-by: Ashish Tiwari --- .github/workflows/docker-push.yml | 43 +++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 .github/workflows/docker-push.yml diff --git a/.github/workflows/docker-push.yml b/.github/workflows/docker-push.yml new file mode 100644 index 0000000000..80e8f69377 --- /dev/null +++ b/.github/workflows/docker-push.yml @@ -0,0 +1,43 @@ +name: push on dockerhub +on: + workflow_dispatch: + inputs: + tag: + description: 'tag of the image' + required: true + default: 'latest' + branch: + description: 'checkout branch to build image' + required: true + default: 'master' + + +jobs: + docker: + runs-on: ubuntu-latest + steps: + - + name: Checkout + uses: actions/checkout@v3 + with: + ref: '${{ github.event.inputs.branch }}' + - + name: Set up QEMU + uses: docker/setup-qemu-action@v3 + - + name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - + name: Login to Docker Hub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKERHUB_USER }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + - + name: Build and push + uses: docker/build-push-action@v5 + with: + context: . + platforms: linux/amd64,linux/arm64 + push: true + tags: '${{ github.event.inputs.tag }}' \ No newline at end of file From a03b482882dc306a5039242f32a5825f527680d3 Mon Sep 17 00:00:00 2001 From: Ashish Tiwari Date: Mon, 4 Dec 2023 14:02:08 +0530 Subject: [PATCH 2/3] add license Signed-off-by: Ashish Tiwari --- .github/workflows/docker-push.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/.github/workflows/docker-push.yml b/.github/workflows/docker-push.yml index 80e8f69377..196dfa4e5d 100644 --- a/.github/workflows/docker-push.yml +++ b/.github/workflows/docker-push.yml @@ -1,3 +1,21 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# name: push on dockerhub on: workflow_dispatch: From 625c23b3f759b59a4b0ab5ccebee8ec38095303f Mon Sep 17 00:00:00 2001 From: Abhishek Choudhary Date: Wed, 6 Dec 2023 13:44:17 +0545 Subject: [PATCH 3/3] Update .github/workflows/docker-push.yml --- .github/workflows/docker-push.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker-push.yml b/.github/workflows/docker-push.yml index 196dfa4e5d..c23ef978b1 100644 --- a/.github/workflows/docker-push.yml +++ b/.github/workflows/docker-push.yml @@ -58,4 +58,4 @@ jobs: context: . platforms: linux/amd64,linux/arm64 push: true - tags: '${{ github.event.inputs.tag }}' \ No newline at end of file + tags: '${{ github.event.inputs.tag }}'