70 lines
2.0 KiB
YAML
70 lines
2.0 KiB
YAML
name: "Portainer Deploy Action"
|
|
description: "Deploy or redeploy Portainer stacks directly from GitHub Actions."
|
|
author: "Zoe"
|
|
branding:
|
|
icon: "upload-cloud"
|
|
color: "blue"
|
|
|
|
inputs:
|
|
portainer-url:
|
|
description: "Base API URL for your Portainer instance (e.g. https://portainer.example.com/api)"
|
|
required: true
|
|
portainer-token:
|
|
description: "Portainer API token"
|
|
required: true
|
|
portainer-endpoint:
|
|
description: "Portainer endpoint ID"
|
|
required: true
|
|
stack-name:
|
|
description: "Name of the stack to create or redeploy"
|
|
required: true
|
|
repo-url:
|
|
description: "Git repository URL containing the stack definition"
|
|
required: true
|
|
repo-ref:
|
|
description: "Git reference (e.g. refs/heads/main)"
|
|
required: true
|
|
repo-compose-file:
|
|
description: "Path to the docker-compose file within the repo"
|
|
required: true
|
|
repo-username:
|
|
description: "Git username (if repository requires authentication)"
|
|
required: false
|
|
repo-password:
|
|
description: "Git password/token (if repository requires authentication)"
|
|
required: false
|
|
tls-skip-verify:
|
|
description: "Set to 'true' to skip TLS verification"
|
|
required: false
|
|
default: "false"
|
|
env-data:
|
|
description: "JSON array of environment variables to set in the stack (e.g. [{\"name\":\"VAR\",\"value\":\"value\"}])"
|
|
required: false
|
|
default: "[]"
|
|
|
|
runs:
|
|
using: "docker"
|
|
image: "Dockerfile"
|
|
args:
|
|
- "-url"
|
|
- "${{ inputs.portainer-url }}"
|
|
- "-token"
|
|
- "${{ inputs.portainer-token }}"
|
|
- "-endpoint"
|
|
- "${{ inputs.portainer-endpoint }}"
|
|
- "-stack"
|
|
- "${{ inputs.stack-name }}"
|
|
- "-repo-url"
|
|
- "${{ inputs.repo-url }}"
|
|
- "-repo-ref"
|
|
- "${{ inputs.repo-ref }}"
|
|
- "-compose"
|
|
- "${{ inputs.repo-compose-file }}"
|
|
- "-repo-user"
|
|
- "${{ inputs.repo-username }}"
|
|
- "-repo-pass"
|
|
- "${{ inputs.repo-password }}"
|
|
- ${{ inputs.tls-skip-verify == 'true' && '-insecure' || '' }}
|
|
- "-env"
|
|
- "${{ inputs.env-data }}"
|