Skip to content

Commit

Permalink
ci(gh-actions): fix tagging docker image
Browse files Browse the repository at this point in the history
  • Loading branch information
moreal committed Nov 28, 2024
1 parent e569bf4 commit 069868f
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions .github/workflows/push_docker_image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,14 +76,13 @@ jobs:
--password '${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}'
- name: push git tagged version
run: |
docker pull ${{ matrix.docker.repo }}:git-${{ github.sha }}
if [[ -z "${{ github.event.inputs.imageTag }}" ]]; then
export IMAGE_TAG=${{ github.ref_name }}
else
export IMAGE_TAG=${{ github.event.inputs.imageTag }}
fi
docker tag \
${{ matrix.docker.repo }}:git-${{ github.sha }} \
${{ matrix.docker.repo }}:$IMAGE_TAG
docker push ${{ matrix.docker.repo }}:$IMAGE_TAG
docker buildx imagetools create \
--progress=plain \
--tag ${{ matrix.docker.repo }}:$IMAGE_TAG \
${{ matrix.docker.repo }}:git-${{ github.sha }}

0 comments on commit 069868f

Please sign in to comment.