kind: pipeline type: docker name: default steps: - name: build-and-push image: plugins/docker settings: repo: registry.your-gitea.com/your-org/mail-autoconfig tags: latest username: from_secret: GITEA_USERNAME password: from_secret: GITEA_TOKEN - name: deploy-to-portainer image: curlimages/curl:7.85.0 environment: PORTAINER_URL: https://portainer.mail.mifi.holdings PORTAINER_API_KEY: from_secret: PORTAINER_API_KEY ENDPOINT_ID: from_secret: PORTAINER_ENDPOINT_ID # e.g. "1" STACK_ID: from_secret: PORTAINER_STACK_ID # the ID of your mailconfig stack commands: - > curl -s -X POST "$PORTAINER_URL/api/stacks/$STACK_ID/file?endpointId=$ENDPOINT_ID&method=string" -H "Authorization: Bearer $PORTAINER_API_KEY" -F "file=@docker-compose.yml" trigger: branch: - main