Remove Portainer deploy CI/CD step
All checks were successful
Docker Build and Push (Multi-architecture) / build-and-push (push) Successful in 20s

This commit is contained in:
2025-09-16 15:07:04 +00:00
parent 8652298006
commit 9ef47cee41
2 changed files with 1 additions and 30 deletions

View File

@@ -38,31 +38,4 @@ jobs:
cache-to: type=registry,ref=${{ vars.REGISTRY }}/${{ github.repository_owner }}/${{ vars.IMAGE_NAME }}:cache,mode=max
tags: |
${{ vars.REGISTRY }}/${{ github.repository_owner }}/${{ vars.IMAGE_NAME }}:latest
${{ vars.REGISTRY }}/${{ github.repository_owner }}/${{ vars.IMAGE_NAME }}:${{ github.sha }}
- name: Deploy to Portainer
run: |
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 PUT \
"${{ vars.PORTAINER_URL }}/api/stacks/$STACK_ID?endpointId=16" \
-H "X-API-Key: ${{ secrets.PORTAINER_API_KEY }}" \
-H "Content-Type: application/json" \
-d '{
"pullImage": true,
"prune": true,
"env": [
{"name": "IMAGE_TAG", "value": "${{ github.sha }}"}
]
}'
echo "Deployment triggered for stack ID: $STACK_ID"
continue-on-error: false
- name: Verify deployment
run: |
echo "Deployment triggered successfully for commit ${{ github.sha }}"
${{ vars.REGISTRY }}/${{ github.repository_owner }}/${{ vars.IMAGE_NAME }}:${{ github.sha }}

View File

@@ -1,5 +1,3 @@
version: 3
services:
pterodisbot:
image: ${IMAGE_URI}:${IMAGE_TAG:-latest}