mirror of
https://github.com/tbabej/taskwiki.git
synced 2025-08-24 05:36:41 +02:00
ci: Simplify getting branch HEAD commit hash
This is simpler and more reliable/predictable: "git ls-remote 'heads/'" doesn't return anything, while "grep 'heads/'" returns all branches, so a taskwarrior push causes most docker images (those that don't have any TASK_VERSION and fallback to the Dockerfile default) to be rebuilt, not just the one that needs to be.
This commit is contained in:
parent
36652d1f9b
commit
3498c51a46
1 changed files with 1 additions and 5 deletions
6
.github/workflows/tests.yaml
vendored
6
.github/workflows/tests.yaml
vendored
|
@ -26,11 +26,7 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
set -ex -o pipefail
|
set -ex -o pipefail
|
||||||
shopt -s lastpipe
|
shopt -s lastpipe
|
||||||
(
|
git ls-remote https://github.com/GothenburgBitFactory/taskwarrior.git heads/"$TASK_VERSION" | read -r TASK_DEVEL_SHA _ || :
|
||||||
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"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue