fix(ci): use cut instead of bash substring for short SHA (POSIX sh)
CI / Build Native (push) Failing after 9m5s

The act runner uses /bin/sh (dash on Debian/Ubuntu), not bash.
The syntax ${GITHUB_SHA::7} is bash-specific substring expansion
and throws 'Bad substitution' under dash.

Replace with POSIX-portable equivalent:
    SHORT_SHA=$(echo "$GITHUB_SHA" | cut -c1-7)

Works in any sh-compatible shell (dash, bash, zsh, etc.).
This commit is contained in:
2026-08-12 19:58:09 -04:00
parent d067110103
commit 9bae7dfe29
+1 -1
View File
@@ -79,7 +79,7 @@ jobs:
docker build -t shot-crafter-calculator:ci . docker build -t shot-crafter-calculator:ci .
echo "=== Login to Gitea Registry ===" echo "=== Login to Gitea Registry ==="
echo "${{ secrets.REGISTRY_TOKEN }}" | docker login gitea.danielarroyo.cl -u "${{ secrets.REGISTRY_USERNAME }}" --password-stdin echo "${{ secrets.REGISTRY_TOKEN }}" | docker login gitea.danielarroyo.cl -u "${{ secrets.REGISTRY_USERNAME }}" --password-stdin
SHORT_SHA="${GITHUB_SHA::7}" SHORT_SHA=$(echo "$GITHUB_SHA" | cut -c1-7)
echo "=== Tag ===" echo "=== Tag ==="
docker tag shot-crafter-calculator:ci gitea.danielarroyo.cl/proyectos/shot-crafter-calculator:latest docker tag shot-crafter-calculator:ci gitea.danielarroyo.cl/proyectos/shot-crafter-calculator:latest
docker tag shot-crafter-calculator:ci gitea.danielarroyo.cl/proyectos/shot-crafter-calculator:${SHORT_SHA} docker tag shot-crafter-calculator:ci gitea.danielarroyo.cl/proyectos/shot-crafter-calculator:${SHORT_SHA}