From 88f922cef8c3b9a2f94f3e4fca25355b7bba3505 Mon Sep 17 00:00:00 2001 From: George J Padayatti Date: Wed, 15 Nov 2023 17:27:03 +0530 Subject: [PATCH] Upd: Github release worfklow Signed-off-by: George J Padayatti --- .github/workflows/dockerhub.yml | 30 ++++++++++++------------------ 1 file changed, 12 insertions(+), 18 deletions(-) diff --git a/.github/workflows/dockerhub.yml b/.github/workflows/dockerhub.yml index 63e02e5..828d4a0 100644 --- a/.github/workflows/dockerhub.yml +++ b/.github/workflows/dockerhub.yml @@ -24,25 +24,19 @@ jobs: - name: Get the version id: get_version run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//} - - # Setup gcloud CLI - - uses: google-github-actions/setup-gcloud@v0 - with: - version: "270.0.0" - service_account_key: ${{ secrets.GKE_SA_KEY }} - project_id: ${{ secrets.GKE_PROJECT }} - - # Configure Docker to use the gcloud command-line tool as a credential - # helper for authentication - - run: |- - gcloud --quiet auth configure-docker - - # Get the GKE credentials so we can deploy to the cluster - - uses: google-github-actions/get-gke-credentials@fb08709ba27618c31c09e014e1d8364b02e5042e + + - name: Extract tag from version + id: extract_tag + run: echo ::set-output name=TAG::$(echo ${{ steps.get_version.outputs.VERSION }} | sed 's/refs\/tags\///') + + - name: Set Docker Tag + run: echo "DOCKER_HUB_TAG=${{steps.extract_tag.outputs.TAG}}" >> $GITHUB_ENV + + - name: Login to Docker Hub + uses: docker/login-action@v3 with: - cluster_name: ${{ env.GKE_CLUSTER }} - location: ${{ env.GKE_ZONE }} - credentials: ${{ secrets.GKE_SA_KEY }} + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} # Build the Go builder docker image - name: Build the Go builder docker image