Skip to content

Commit

Permalink
Removed docker API calling (#109)
Browse files Browse the repository at this point in the history
  • Loading branch information
harishp8889 authored Jan 13, 2025
1 parent 4d8c243 commit cf3de5b
Showing 1 changed file with 4 additions and 14 deletions.
18 changes: 4 additions & 14 deletions .github/workflows/csm-release-driver-module.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -120,7 +112,5 @@ jobs:

- name: Create release branch
run: |
git config --global user.name 'github-actions'
git config --global user.email '[email protected]'
git checkout -b release/v${{ inputs.version }}
git push origin release/v${{ inputs.version }}

0 comments on commit cf3de5b

Please sign in to comment.