Fix Github action Docker image tags to use the SHA1 of HEAD (#7)

Signed-off-by: Sebastiano Mariani <smariani@vmware.com>
pull/1/head
Sebastiano Mariani 2022-11-22 12:06:57 -08:00 committed by GitHub
parent 9b2471d267
commit bc512da318
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -20,7 +20,7 @@ jobs:
run: |
docker compose --file build-docker-compose.yml --env-file template.env build
# Tag the image with the commit SHA[0:7]
DOCKER_IMG_TAG=`echo "${{ github.event.pull_request.head.sha }}" | cut -c 1-7`
DOCKER_IMG_TAG=`echo "${{ github.sha }}" | cut -c 1-7`
docker tag ${{ secrets.DOCKER_USERNAME }}/misp-docker:core-latest ${{ secrets.DOCKER_USERNAME }}/misp-docker:core-$DOCKER_IMG_TAG
docker tag ${{ secrets.DOCKER_USERNAME }}/misp-docker:modules-latest ${{ secrets.DOCKER_USERNAME }}/misp-docker:modules-$DOCKER_IMG_TAG