Skip to content

Commit eb6c8ab

Browse files
ci(internal-workflows): preserve empty publish variables (#932)
Co-authored-by: Peter Pathirana <peter@latent.io>
1 parent 339dead commit eb6c8ab

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

‎actions/coder-template-push/action.yaml‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,18 @@ runs:
5454
TEMPLATE_MESSAGE: ${{ inputs.message }}
5555
# yamllint disable-line rule:indentation
5656
run: |
57+
variables_file="${RUNNER_TEMP}/coder-template-variables.yaml"
58+
jq --null-input \
59+
--arg kubernetes_config_path "${KUBERNETES_CONFIG_PATH}" \
60+
'{kubernetes_config_path: $kubernetes_config_path}' > "${variables_file}"
5761
push_args=(
5862
--directory "${TEMPLATE_DIR}"
5963
--var "workspace_image=${WORKSPACE_IMAGE}"
6064
--var "home_pvc_storage_class=${HOME_PVC_STORAGE_CLASS}"
6165
--var "tmp_pvc_storage_class=${TMP_PVC_STORAGE_CLASS}"
62-
--var "kubernetes_config_path=${KUBERNETES_CONFIG_PATH}"
66+
# Coder discards an empty `--var name=` assignment. A variables file
67+
# preserves the required empty string used for in-cluster auth.
68+
--variables-file "${variables_file}"
6369
--var "skip_dotfiles_scripts=${SKIP_DOTFILES_SCRIPTS}"
6470
--name "${TEMPLATE_VERSION}"
6571
--yes

0 commit comments

Comments
 (0)