Test CI/CD flow
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 14:28:00 +00:00
parent da186697a2
commit 8652298006

View File

@@ -42,21 +42,17 @@ jobs:
- name: Deploy to Portainer
run: |
COMPOSE_CONTENT=$(cat docker-compose.yml)
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')
# ENDPOINT_ID=16
curl -v -X PUT \
"${{ vars.PORTAINER_URL }}/api/stacks/$STACK_ID?endpointID=16" \
"${{ 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": [