new menu, trying to keep envs, faster api calls etc
Some checks failed
Build Images and Deploy / Update-PROD-Stack (push) Failing after 18s

This commit is contained in:
2026-01-30 16:17:26 -05:00
parent 432dc48c9a
commit 7706234a7b
5 changed files with 143 additions and 25 deletions

View File

@@ -54,9 +54,12 @@ jobs:
# Read stack file content
STACK_FILE_CONTENT=$(echo "$(<prod-compose.yml )")
# Prepare JSON payload
JSON_PAYLOAD=$(jq -n --arg stackFileContent "$STACK_FILE_CONTENT" --argjson pullImage true \
'{stackFileContent: $stackFileContent, pullImage: $pullImage}')
# Parse .env file into JSON array format for Portainer
ENV_VARS=$(cat .env | grep -v '^#' | grep -v '^$' | jq -R -s -c 'split("\n") | map(select(length > 0)) | map(split("=") | {name: .[0], value: (.[1:] | join("="))}) | map(select(.name != ""))')
# Prepare JSON payload with environment variables
JSON_PAYLOAD=$(jq -n --arg stackFileContent "$STACK_FILE_CONTENT" --argjson pullImage true --argjson env "$ENV_VARS" \
'{stackFileContent: $stackFileContent, pullImage: $pullImage, env: $env}')
echo "About to push the following JSON payload:"
echo $JSON_PAYLOAD