Skip to content

Commit

Permalink
ci: Consider the HEAD commit hash for our cache test image tag
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
tbabej committed Sep 18, 2020
1 parent 8353170 commit b549521
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,20 @@ jobs:
- uses: actions/checkout@v2
- name: Prepare docker image
run: |
set -ex -o pipefail
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 "$TASK_DEVEL_SHA"
(
echo ALPINE_VERSION="$ALPINE_VERSION"
echo PYTHON_VERSION="$PYTHON_VERSION"
echo TASK_VERSION="$TASK_VERSION"
echo VIM_VERSION="$VIM_VERSION"
echo VIMWIKI_VERSION="$VIMWIKI_VERSION"
echo TASK_DEVEL_SHA="$TASK_DEVEL_SHA"
cat Dockerfile
) | sha256sum | read -r tag _
docker login "$DOCKER_REGISTRY" -u "$GITHUB_USER" -p "$GITHUB_TOKEN" || :
Expand Down

0 comments on commit b549521

Please sign in to comment.