SpinShare Referee Bot refbot.ellite.dev/overlay
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

preserve env in CI

+11 -2
+11 -2
.tangled/workflows/buildnpush.yml
··· 57 57 58 58 - name: Update Portainer Stack 59 59 command: | 60 + # Fetch current stack environment variables 61 + CURRENT_ENV=$(curl -s -H "X-API-Key: $PORTAINER_TOKEN" \ 62 + "https://portainer.ellite.dev/api/stacks/111" | jq -c '.Env // []') 63 + 64 + # Fetch current compose file 60 65 COMPOSE=$(curl -s -H "X-API-Key: $PORTAINER_TOKEN" \ 61 66 "https://portainer.ellite.dev/api/stacks/111/file" | jq -r '.StackFileContent') 67 + 68 + # Update stack while preserving environment variables 62 69 curl -s -m 120 -X PUT \ 63 70 "https://portainer.ellite.dev/api/stacks/111?endpointId=2" \ 64 71 -H "X-API-Key: $PORTAINER_TOKEN" \ 65 72 -H "Content-Type: application/json" \ 66 - -d "{\"stackFileContent\": $(echo "$COMPOSE" | jq -Rs .), \"env\": [], \"pullImage\": true}" \ 67 - || true 73 + -d "{\"stackFileContent\": $(echo "$COMPOSE" | jq -Rs .), \"env\": $CURRENT_ENV, \"pullImage\": true}" \ 74 + > /dev/null 2>&1 75 + 76 + echo "Stack updated successfully"