Skip to content

Commit

Permalink
ci(gradle): improve Docker image pushing process
Browse files Browse the repository at this point in the history
- Replace direct pushes with a loop that iterates over generated tags- Add echo statements to improve CI log readability
- Remove redundant '--all-tags' option as it's not needed with the new approach
  • Loading branch information
vnobo committed Dec 14, 2024
1 parent 5e2714d commit 6d61b68
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions .github/workflows/gradle-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,10 @@ jobs:
done <<< "${{ steps.meta.outputs.tags }}"
- name: Push docker platform image to DockerHub
run: |
docker push ${{ env.GITHUB_REGISTRY }}/plate-platform
docker push ${{ env.DOCKER_REGISTRY }}/plate-platform
while IFS= read -r tag; do
echo "Push platform image $tag"
docker push "$tag"
done <<< "${{ steps.meta.outputs.tags }}"
- name: Extract oauth2 metadata (tags, labels) for Docker
id: oauth2
Expand All @@ -106,6 +108,8 @@ jobs:
done <<< "${{ steps.oauth2.outputs.tags }}"
- name: Push docker oauth2 image to DockerHub
run: |
docker push --all-tags ${{ env.GITHUB_REGISTRY }}/plate-oauth2
docker push --all-tags ${{ env.DOCKER_REGISTRY }}/plate-oauth2
while IFS= read -r tag; do
echo "Push oauth2 image $tag"
docker push "$tag"
done <<< "${{ steps.oauth2.outputs.tags }}"

0 comments on commit 6d61b68

Please sign in to comment.