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 - name: Deploy to Portainer
run: | run: |
COMPOSE_CONTENT=$(cat docker-compose.yml)
STACK_RESPONSE=$(curl -s -X GET \ STACK_RESPONSE=$(curl -s -X GET \
"${{ vars.PORTAINER_URL }}/api/stacks" \ "${{ vars.PORTAINER_URL }}/api/stacks" \
-H "X-API-Key: ${{ secrets.PORTAINER_API_KEY }}") -H "X-API-Key: ${{ secrets.PORTAINER_API_KEY }}")
STACK_ID=$(echo $STACK_RESPONSE | jq -r '.[] | select(.Name == "${{ vars.STACK_NAME }}") | .Id') STACK_ID=$(echo $STACK_RESPONSE | jq -r '.[] | select(.Name == "${{ vars.STACK_NAME }}") | .Id')
# ENDPOINT_ID=16
curl -v -X PUT \ 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 "X-API-Key: ${{ secrets.PORTAINER_API_KEY }}" \
-H "Content-Type: application/json" \ -H "Content-Type: application/json" \
-d '{ -d '{
# "stackFileContent": '"$COMPOSE_CONTENT"',
"pullImage": true, "pullImage": true,
"prune": true, "prune": true,
"env": [ "env": [