Remove Portainer deploy CI/CD step
All checks were successful
Docker Build and Push (Multi-architecture) / build-and-push (push) Successful in 20s
All checks were successful
Docker Build and Push (Multi-architecture) / build-and-push (push) Successful in 20s
This commit is contained in:
@@ -39,30 +39,3 @@ jobs:
|
||||
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 }}"
|
||||
@@ -1,5 +1,3 @@
|
||||
version: 3
|
||||
|
||||
services:
|
||||
pterodisbot:
|
||||
image: ${IMAGE_URI}:${IMAGE_TAG:-latest}
|
||||
|
||||
Reference in New Issue
Block a user