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:
@@ -38,31 +38,4 @@ jobs:
|
|||||||
cache-to: type=registry,ref=${{ vars.REGISTRY }}/${{ github.repository_owner }}/${{ vars.IMAGE_NAME }}:cache,mode=max
|
cache-to: type=registry,ref=${{ vars.REGISTRY }}/${{ github.repository_owner }}/${{ vars.IMAGE_NAME }}:cache,mode=max
|
||||||
tags: |
|
tags: |
|
||||||
${{ vars.REGISTRY }}/${{ github.repository_owner }}/${{ vars.IMAGE_NAME }}:latest
|
${{ vars.REGISTRY }}/${{ github.repository_owner }}/${{ vars.IMAGE_NAME }}:latest
|
||||||
${{ vars.REGISTRY }}/${{ github.repository_owner }}/${{ vars.IMAGE_NAME }}:${{ github.sha }}
|
${{ 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:
|
services:
|
||||||
pterodisbot:
|
pterodisbot:
|
||||||
image: ${IMAGE_URI}:${IMAGE_TAG:-latest}
|
image: ${IMAGE_URI}:${IMAGE_TAG:-latest}
|
||||||
|
|||||||
Reference in New Issue
Block a user