Get Short SHA ID and Use it in a CI Process
Get the short SHA ID
Put the following variable in your script
${{CF_SHORT_REVISION}}
Use the SHA ID in a tag
tag: ${{CF_SHORT_REVISION}}
YAML example
step-name:
type: build
description: Free text description
working-directory: ${{clone-step-name}}
dockerfile: path/to/Dockerfile
image-name: owner/new-image-name
tag: ${{CF_SHORT_REVISION}}
build-arguments:
- key=value
fail-fast: false