portainer-stack-git-redeplo.../README.md

39 lines
1.3 KiB
Markdown
Raw Permalink Normal View History

2022-12-08 22:16:33 +01:00
# Portainer stack redeploy action
This action allows you to update the stack with pull new images if you can't use webhooks. For example, in Portainer Community Edition.
2023-08-17 19:17:58 +02:00
This is a fork of [wirgen/portainer-stack-redeploy-action](https://github.com/wirgen/portainer-stack-redeploy-action) which allows to update stack deployed with a git repository hosting the `docker-compose.yaml`.
2022-12-08 22:16:33 +01:00
## Inputs
### `portainerUrl`
**Required** URL to the application instance. For example, https://example.com:9443
### `accessToken`
**Required** Token for API requests, can be created on the page https://example.com:9443/#!/account/tokens/new
### `stackId`
**Required** ID of stack to be updated. Must be integer
### `endpointId`
ID of endpoint (environment). Required if your stack is not in local environment
2023-08-17 19:17:58 +02:00
### `environment`
Environment variables to set on the stack. When omitted, all existing variables will be cleared from the stack. Must be input as a JSON String; one array of objects each with the keys `name` and `value`
2022-12-08 22:16:33 +01:00
## Example usage
```yaml
2023-08-17 19:17:58 +02:00
uses: JuliusFreudenberger/portainer-stack-git-redeploy-action@v1.0
2022-12-08 22:16:33 +01:00
with:
portainerUrl: 'https://example.com:9443'
accessToken: 'ptr_XXXyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy'
stackId: 8
endpointId: 3
2023-08-17 19:17:58 +02:00
environment: '[{"name":"image_version","value":"xxx"}]'
2022-12-08 22:16:33 +01:00
```