Skip to content

Commit

Permalink
Calculate short SHA
Browse files Browse the repository at this point in the history
  • Loading branch information
olegeech-me committed Nov 12, 2024
1 parent f562e36 commit 32fb90b
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions .github/workflows/build-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,13 @@ jobs:
fi
echo "Latest tag is $TAG"
echo "::set-output name=base_version::$TAG"
- name: Set short git commit SHA
id: get_sha
run: |
SHORT_SHA=$(git rev-parse --short ${{ github.sha }})
echo "Short commit SHA is $SHORT_SHA"
echo "::set-output name=short_sha::$SHORT_SHA"
# Setup Docker Buildx
- name: Set up Docker Buildx
Expand All @@ -47,7 +54,7 @@ jobs:
olegeech/mvcr-application-checker:bot-${{ steps.get_tag.outputs.base_version }}
build-args: |
BASE_VERSION=${{ steps.get_tag.outputs.base_version }}
GIT_COMMIT=${{ github.sha::5 }}
GIT_COMMIT=${{ steps.get_sha.outputs.short_sha }}
# Build and push fetcher image
- name: Build and push fetcher Docker image
Expand All @@ -61,4 +68,4 @@ jobs:
olegeech/mvcr-application-checker:fetcher-${{ steps.get_tag.outputs.base_version }}
build-args: |
BASE_VERSION=${{ steps.get_tag.outputs.base_version }}
GIT_COMMIT=${{ github.sha::5 }}
GIT_COMMIT=${{ steps.get_sha.outputs.short_sha }}

0 comments on commit 32fb90b

Please sign in to comment.