From cf3de5b65267397a7dda5f7f276efd1f1e64fe68 Mon Sep 17 00:00:00 2001 From: Harish P Date: Mon, 13 Jan 2025 17:44:52 +0530 Subject: [PATCH] Removed docker API calling (#109) --- .../workflows/csm-release-driver-module.yaml | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/.github/workflows/csm-release-driver-module.yaml b/.github/workflows/csm-release-driver-module.yaml index abee880..71cc15a 100644 --- a/.github/workflows/csm-release-driver-module.yaml +++ b/.github/workflows/csm-release-driver-module.yaml @@ -50,19 +50,11 @@ jobs: - name: Log in to Docker Hub run: echo "${{ secrets.DOCKERHUB_PASSWORD }}" | docker login -u "${{ secrets.DOCKERHUB_USERNAME }}" --password-stdin - - name: Get Docker Token - id: get_token + - name: Push Docker Image run: | - TOKEN=$(curl -s -u "${{ secrets.DOCKERHUB_USERNAME }}:${{ secrets.DOCKERHUB_PASSWORD }}" "https://auth.docker.io/token?service=registry.docker.io&scope=repository:dellemc/${{ inputs.image }}:pull,push" | jq -r '.token') - echo "::set-output name=token::$TOKEN" - - - name: Get Docker Manifest - run: | - curl -s -H "Authorization: Bearer ${{ steps.get_token.outputs.token }}" -H "Accept: application/vnd.docker.distribution.manifest.v2+json" https://index.docker.io/v2/dellemc/${{ inputs.image }}/manifests/nightly > manifest.json - - - name: Push Docker Manifest - run: | - curl -XPUT -s -H "Authorization: Bearer ${{ steps.get_token.outputs.token }}" -H "Content-type: application/vnd.docker.distribution.manifest.v2+json" https://index.docker.io/v2/dellemc/${{ inputs.image }}/manifests/v${{ inputs.version }} -d '@manifest.json' + docker pull dellemc/${{ inputs.image }}:nightly + docker tag dellemc/${{ inputs.image }}:nightly dellemc/${{ inputs.image }}:v${{ inputs.version }} + docker push dellemc/${{ inputs.image }}:v${{ inputs.version }} - name: Get Quay Manifest id: get_quay_manifest @@ -120,7 +112,5 @@ jobs: - name: Create release branch run: | - git config --global user.name 'github-actions' - git config --global user.email 'github-actions@github.com' git checkout -b release/v${{ inputs.version }} git push origin release/v${{ inputs.version }}