From 6f4239337ed250311f32a68f9cbcd464731476c6 Mon Sep 17 00:00:00 2001 From: timmyhadwen Date: Sun, 23 Aug 2026 18:57:56 +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/default.kibot.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/configs/default.kibot.yaml b/configs/default.kibot.yaml index 251eeee..0463235 100644 --- a/configs/default.kibot.yaml +++ b/configs/default.kibot.yaml @@ -11,9 +11,9 @@ preflight: # drc: true 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: 'date' expand_kibot_patterns: true text: '%D' @@ -33,7 +33,7 @@ preflight: global: environment: - user_templates: "${CI_PROJECT_DIR}/.gitlab/templates" + user_templates: "${WORKDIR}/.gitlab/templates" restore_project: true outputs: @@ -341,4 +341,4 @@ groups: definitions: _KIBOT_POS_ENABLED: false _KIBOT_BOM_ENABLED: false - _KIBOT_MANF_DIR_COMP: "." + _KIBOT_MANF_DIR_COMP: "." \ No newline at end of file