I want to build a docker image using a GitHub action, migrating from TeamCity.
In the build script, I want to tag the image with a combination of branch and commit, e.g.
You can get it this way in your sh file -
BRANCH_NAME=$(echo $GITHUB_REF | cut -d'/' -f 3) GITHUB_SHA_SHORT=$(echo $GITHUB_SHA | cut -c1-8)