I am creating a workflow in GitHub which creates and uses a docker image. Therefore I have started my workflow file with a global environment variable for this docker image which is visible for all the jobs in my workflow:
name: continuous integration
on:
push:
branches:
- '**'
env:
IMAGE: docker.pkg.github.com/${{ github.repository }}/jactor-persistence:${{ github.sha }}
I want to replace ${{ github.sha }}
with the short sha of the head commit, the same as the result of the following command git rev-parse --short HEAD
Is this possible?