Fix CI/CD workflow
All checks were successful
Docker Build and Push (Multi-architecture) / build-and-push (push) Successful in 21s

This commit is contained in:
2025-09-16 13:57:31 +00:00
parent 88b79584bf
commit f84780ef63
3 changed files with 24 additions and 3 deletions

View File

@@ -42,17 +42,20 @@ jobs:
- name: Deploy to Portainer
run: |
COMPOSE_CONTENT=$(cat docker-compose.yml | base64 -w 0)
STACK_RESPONSE=$(curl -s -X GET \
"${{ vars.PORTAINER_URL }}/api/stacks" \
-H "X-API-Key: ${{ secrets.PORTAINER_API_KEY }}")
STACK_ID=$(echo $STACK_RESPONSE | jq -r '.[] | select(.Name == "${{ vars.STACK_NAME }}") | .Id')
curl -v -X POST \
"${{ vars.PORTAINER_URL }}/api/stacks/$STACK_ID/update" \
curl -v -X PUT \
"${{ vars.PORTAINER_URL }}/api/stacks/$STACK_ID?endpointId=16" \
-H "X-API-Key: ${{ secrets.PORTAINER_API_KEY }}" \
-H "Content-Type: application/json" \
-d '{
"stackFileContent": '"$COMPOSE_CONTENT"',
"pullImage": true,
"prune": true,
"env": [