Skip to content

Commit

Permalink
split up tagging and pushing
Browse files Browse the repository at this point in the history
  • Loading branch information
CubicrootXYZ committed Aug 3, 2024
1 parent 7834b2f commit 277de74
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/build_image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,10 @@ jobs:
password: ${{ secrets.dockerhub_token }}
- name: Push image with commit SHA
run: docker push ${{ inputs.image_name }}:${{ github.sha }}
- name: Tag image with tag
if: "startsWith(github.ref, 'refs/tags/')"
run: docker tag ${{ inputs.image_name }}:${{ github.sha }} ${{ inputs.image_name }}:${{ github.ref_name }}
- name: Push image with tag
if: "startsWith(github.ref, 'refs/tags/')"
run: docker tag ${{ inputs.image_name }}:${{ github.sha }} ${{ inputs.image_name }}:${{ github.ref_name }} && \
docker push ${{ inputs.image_name }}:${{ github.ref_name }}
run: docker push ${{ inputs.image_name }}:${{ github.ref_name }}

0 comments on commit 277de74

Please sign in to comment.