diff --git a/.gitea/workflows/docker-build.yml b/.gitea/workflows/docker-build.yml index 8cdf9ea..0e99d24 100644 --- a/.gitea/workflows/docker-build.yml +++ b/.gitea/workflows/docker-build.yml @@ -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 }}" \ No newline at end of file + ${{ vars.REGISTRY }}/${{ github.repository_owner }}/${{ vars.IMAGE_NAME }}:${{ github.sha }} \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index f531e3f..e76a1f0 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,5 +1,3 @@ -version: 3 - services: pterodisbot: image: ${IMAGE_URI}:${IMAGE_TAG:-latest}