From 18cc35f92378a13de1066f9a38375853f74d8389 Mon Sep 17 00:00:00 2001 From: timmyhadwen Date: Sun, 23 Aug 2026 18:57:57 +1000 Subject: [PATCH] fix: replace GitLab-only CI variables CI_PROJECT_DIR and CI_COMMIT_SHORT_SHA do not exist on Gitea Actions. user_templates was resolving to /.gitlab/templates, and the rev fallback echoed an empty string. Use WORKDIR (already exported into the KiBot container) and GITHUB_SHA. --- configs/mech.kibot.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/configs/mech.kibot.yaml b/configs/mech.kibot.yaml index e749d72..305773c 100644 --- a/configs/mech.kibot.yaml +++ b/configs/mech.kibot.yaml @@ -12,8 +12,8 @@ preflight: drc: false set_text_variables: - name: 'rev' - command: 'if [ -n "$KIBOT_VAR_rev" ]; then echo $KIBOT_VAR_rev; else git describe --tags 2>/dev/null || echo $CI_COMMIT_SHORT_SHA; fi' + command: 'if [ -n "$KIBOT_VAR_rev" ]; then echo $KIBOT_VAR_rev; else git describe --tags 2>/dev/null || echo ${GITHUB_SHA:0:8}; fi' - name: 'rev_pcb' - command: 'if [ -n "$KIBOT_VAR_rev_pcb" ]; then echo $KIBOT_VAR_rev_pcb; else git describe --tags 2>/dev/null || echo $CI_COMMIT_SHORT_SHA; fi' + command: 'if [ -n "$KIBOT_VAR_rev_pcb" ]; then echo $KIBOT_VAR_rev_pcb; else git describe --tags 2>/dev/null || echo ${GITHUB_SHA:0:8}; fi' - name: 'name' - command: 'if [ -n "$KIBOT_VAR_name" ]; then echo $KIBOT_VAR_name; else echo $KIBOT_PCB_NAME | rev | cut -d"/" -f1 | rev | cut -d"-" -f1; fi' + command: 'if [ -n "$KIBOT_VAR_name" ]; then echo $KIBOT_VAR_name; else echo $KIBOT_PCB_NAME | rev | cut -d"/" -f1 | rev | cut -d"-" -f1; fi' \ No newline at end of file