required portainer server url. like this: http://xxx.com:9000
required portainer username
required portainer password
portainer endpoint id, default 1, localhost is 1
required name of stack
address of registry, like: myregistry.example.com (leave empty for Docker Hub)
required name of pull image, like: mcr.microsoft.com/dotnet/core/aspnet:3.1-alpine
content of docker-compose.yml. only support for version: "2"
docker_compose: |
version: "2"
services:
dotnet_test:
image: mcr.microsoft.com/dotnet/core/aspnet:3.1-alpine
container_name: dotnet_runtime
leave empty for use the current docker-compose file content
The following will pull image mcr.microsoft.com/dotnet/core/aspnet:3.1-alpine, and deploy docker-compose to portainer.
- name: deploy to portainer
uses: LGinC/portainer-stack-deploy@master
with:
serverurl: http://xxx.com:9000
username: ${{ secrets.PORTAINER_USERNAME }}
password: ${{ secrets.PORTAINER_PASSWORD }}
endpointId: 1
stackname: dotnet_test
registry: mcr.microsoft.com
imagename: dotnet/core/aspnet:3.1-alpine
docker_compose: |
version: "2"
services:
dotnet_test:
image: mcr.microsoft.com/dotnet/core/aspnet:3.1-alpine
container_name: dotnet_runtime