-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4d8c243
commit cf3de5b
Showing
1 changed file
with
4 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 '[email protected]' | ||
git checkout -b release/v${{ inputs.version }} | ||
git push origin release/v${{ inputs.version }} |