This action deploy image by portainer
required portainer server url. like this: http://xxx.com:9000
portainer服务器公网地址 需要公网能够访问
required portainer username
portainer 面板登录所用的用户名
required portainer password
portainer 面板登录所用的密码
portainer endpoint id,default 1, localhost is 1
portainer终结点id,默认是1,即第一个,一般为localhost
required name of stack
服务栈的名称,会在stacks列表里显示
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. ps: portainer just support version: "2"
docker-compose.yml的内容 注意:portainer目前仅支持version: "2"
like this:
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