Inputs
💡 Click on the Input Name for more Details.
Input Name | Default Input Value | Short Description of Input |
---|---|---|
name * | - | Stack Name |
url * | - | Portainer URL |
token * | - | Portainer Token |
file | docker-compose.yaml | Compose File |
endpoint | endpoints[0].Id | Portainer Endpoint |
ref | current reference | Repository Ref |
repo | current repository | Repository URL |
tlsskip | false | Skip Repo TLS Verify |
prune | true | Prune Services |
pull | true | Pull Images |
type | repo | Type [repo , file ] |
standalone | false | Deploy Standalone Stack |
env_json | - | Dotenv JSON Data |
env_file | - | Dotenv File Path |
merge_env | false | Merge Env Vars |
username | - | Repository Username |
password | - | Repository Password |
fs_path ¹ | - | Relative Path (BE) |
summary | true | Add Summary to Job |
* Required
¹ Business Edition Only
For more details on inputs see the Portainer CE API Documentation.
Details
name Requierd
Swarm sack name or Compose project name.
Example: cool-stack
url Requierd
Portainer URL.
This is the base url to your Portainer instance.
Example: https://portainer.example.com:9443
token Requierd
Portainer API token.
For Instructions to create an API token visit: https://docs.portainer.io/api/access
file
The Docker compose file. This path is relative to your working directory.
If you check out your repository to the root, and the compose file is called docker-compose.yaml
, and is in the app
directory, set file
to: app/docker-compose.yaml
Default: docker-compose.yaml
endpoint
If endpoint is not provided the first endpoint returned by the API will be used. If you only have one endpoint, this will work as expected, otherwise, you should provide an endpoint.
Example: 1
Default: ${endpoints[0]}
ref
This defaults to the reference that triggered the workflow.
If deploying from a different repository than the current one, you may want to specify the ref
of that repository to deploy from.
Example: refs/heads/master
Default: ${{ github.ref }}
repo
This defaults to the repository running the action.
If you want to deploy a different repository, put the full http URL to that repository.
Example: https://github.com/cssnr/portainer-stack-deploy-action
Default: ${{ github.server_url }}/${{ github.repository }}
tlsskip
Skips SSL verification when cloning the Git repository. Set to true
to enable.
Default: false
prune
Prune services that are no longer referenced (only available for Swarm stacks). Set to false
to disable.
Default: true
pull
Pull latest image before deploy. Set to false
to disable.
Default: true
type
Type of Deployment. Supports either repo
or file
.
Default: repo
standalone
Deploy a compose stack instead of swarm. Set to true
to enable.
Default: false
env_json
Optional environment variables used when creating the stack. File should be in dotenv format and JSON should be an object. Example:
This can be used with env_file. Values in env_file take precedence over these values.
WARNING
Inputs are NOT secure unless using secrets or secure output (masked). Using env_json
on a public repository will otherwise expose this data in the actions' logs. For an example of an action that produces secure out for use with env_json
see the hashicorp/vault-action example. To securely pass unmasked values, use the env_file option.
env_file
Environment File in dotenv format, parsed using dotenv.
This can be used with env_json. Values in this file take precedence over env_json.
merge_env
Set this to true
to merge the current environment variables from the existing stack with any newly provided variables in the env_json or env_file inputs.
When not providing the env_json or env_file inputs the current environment variables from the existing stack are always used.
When deploying a new stack, there are no current environment variables to merge, and this has no effect.
Default: false
username
Username for private repository authentication when type is set to repo
.
This is NOT your Portainer username, see token for Portainer authentication.
password
Password for private repository authentication when type is set to repo
.
This is NOT your Portainer password, see token for Portainer authentication.
fs_path Business Edition Only
Relative Path Support for Portainer BE. Set this to enable relative path volumes support for volume mappings in your compose file.
For more info see the Portainer Documentation - Relative Path Support.
summary
Write a Summary for the job. To disable this set to false
.
For more information see Job Summary.
Default: true