Skip to content

Commit

Permalink
Add sha tag to image
Browse files Browse the repository at this point in the history
  • Loading branch information
BronzBierd committed Dec 20, 2024
1 parent ac802cb commit a47d932
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ inputs:
type: string
description: The docker image tag
required: true
image_sha:
type: string
description: The short SHA of the commit
required: true
artifactory_username:
type: string
description: The Artifactory username
Expand Down Expand Up @@ -69,6 +73,7 @@ runs:
${{ inputs.artifactory_repo }}/${{ inputs.artifactory_image_path }}/${{ inputs.image_name }}
tags: |
type=raw,value=${{ inputs.image_tag }}
type=sha,value=${{ inputs.image_sha }}
- name: Build and Push Image to artifactory.io
uses: docker/build-push-action@v6
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/cd-api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ jobs:
with:
image_name: ${{ env.IMAGE_NAME }}
image_tag: ${{ env.DEPLOYMENT_ENV }}-${{ steps.short_sha.outputs.SHORT_SHA }}
image_sha: ${{ steps.short_sha.outputs.SHORT_SHA }}
artifactory_username: ${{ secrets.ARTIFACTORY_USERNAME }}
artifactory_password: ${{ secrets.ARTIFACTORY_PASSWORD }}
artifactory_repo: ${{ env.ARTIFACTORY_REPO }}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/cd-web.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ jobs:
with:
image_name: ${{ env.IMAGE_NAME }}
image_tag: ${{ env.DEPLOYMENT_ENV }}-${{ steps.short_sha.outputs.SHORT_SHA }}
image_sha: ${{ steps.short_sha.outputs.SHORT_SHA }}
artifactory_username: ${{ secrets.ARTIFACTORY_USERNAME }}
artifactory_password: ${{ secrets.ARTIFACTORY_PASSWORD }}
artifactory_repo: ${{ env.ARTIFACTORY_REPO }}
Expand Down

0 comments on commit a47d932

Please sign in to comment.