Skip to content

Commit b549521

Browse files
committed
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.
1 parent 8353170 commit b549521

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

.github/workflows/tests.yaml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,20 @@ jobs:
2424
- uses: actions/checkout@v2
2525
- name: Prepare docker image
2626
run: |
27-
set -ex -o pipefail
2827
shopt -s lastpipe
28+
(
29+
echo -n sha:
30+
git ls-remote https://github.com/GothenburgBitFactory/taskwarrior.git | \
31+
( grep heads/$TASK_VERSION || : ) | awk '{print $1}'
32+
) | read -r TASK_DEVEL_SHA _ || :
33+
echo "$TASK_DEVEL_SHA"
2934
(
3035
echo ALPINE_VERSION="$ALPINE_VERSION"
3136
echo PYTHON_VERSION="$PYTHON_VERSION"
3237
echo TASK_VERSION="$TASK_VERSION"
3338
echo VIM_VERSION="$VIM_VERSION"
3439
echo VIMWIKI_VERSION="$VIMWIKI_VERSION"
40+
echo TASK_DEVEL_SHA="$TASK_DEVEL_SHA"
3541
cat Dockerfile
3642
) | sha256sum | read -r tag _
3743
docker login "$DOCKER_REGISTRY" -u "$GITHUB_USER" -p "$GITHUB_TOKEN" || :

0 commit comments

Comments
 (0)