ci: Consider the HEAD commit hash for our cache test image tag

For the development branches of taskwarrior, caching 2.5.2 or 2.6.0 is
not sufficient since HEAD is still moving.

Build the tag hash based on the HEAD hash of the development branch in
question.
This commit is contained in:
Tomas Babej 2020-09-18 01:07:29 -04:00
parent 8353170200
commit 36652d1f9b
No known key found for this signature in database
GPG key ID: B0747C6578F7D2F5

View file

@ -26,12 +26,18 @@ jobs:
run: | run: |
set -ex -o pipefail set -ex -o pipefail
shopt -s lastpipe shopt -s lastpipe
(
echo -n sha:
git ls-remote https://github.com/GothenburgBitFactory/taskwarrior.git | \
( grep heads/$TASK_VERSION || : ) | awk '{print $1}'
) | read -r TASK_DEVEL_SHA _ || :
( (
echo ALPINE_VERSION="$ALPINE_VERSION" echo ALPINE_VERSION="$ALPINE_VERSION"
echo PYTHON_VERSION="$PYTHON_VERSION" echo PYTHON_VERSION="$PYTHON_VERSION"
echo TASK_VERSION="$TASK_VERSION" echo TASK_VERSION="$TASK_VERSION"
echo VIM_VERSION="$VIM_VERSION" echo VIM_VERSION="$VIM_VERSION"
echo VIMWIKI_VERSION="$VIMWIKI_VERSION" echo VIMWIKI_VERSION="$VIMWIKI_VERSION"
echo TASK_DEVEL_SHA="$TASK_DEVEL_SHA"
cat Dockerfile cat Dockerfile
) | sha256sum | read -r tag _ ) | sha256sum | read -r tag _
docker login "$DOCKER_REGISTRY" -u "$GITHUB_USER" -p "$GITHUB_TOKEN" || : docker login "$DOCKER_REGISTRY" -u "$GITHUB_USER" -p "$GITHUB_TOKEN" || :