mirror of
https://github.com/JuliusFreudenberger/portainer-stack-git-redeploy-action.git
synced 2024-11-23 19:34:39 +01:00
Compare commits
No commits in common. "0544d68626ff877c6586b570ffcaf06822a5bf65" and "63d9c75bc2897c0c2f07fd70774a273363829b78" have entirely different histories.
0544d68626
...
63d9c75bc2
4 changed files with 1 additions and 19 deletions
|
@ -21,10 +21,6 @@ This is a fork of [wirgen/portainer-stack-redeploy-action](https://github.com/wi
|
||||||
|
|
||||||
ID of endpoint (environment). Required if your stack is not in local environment
|
ID of endpoint (environment). Required if your stack is not in local environment
|
||||||
|
|
||||||
### `repositoryAuthentication`
|
|
||||||
|
|
||||||
Use stored credentials to pull docker-compose.yaml from git repository. When credentials are stored, but this is not set to `true`, the action will fail
|
|
||||||
|
|
||||||
### `environment`
|
### `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`
|
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`
|
||||||
|
|
|
@ -16,16 +16,12 @@ inputs:
|
||||||
description: 'Endpoint ID'
|
description: 'Endpoint ID'
|
||||||
required: false
|
required: false
|
||||||
default: ''
|
default: ''
|
||||||
repositoryAuthentication:
|
|
||||||
description: 'Use stored credentials to pull docker-compose.yaml from git repository'
|
|
||||||
required: false
|
|
||||||
default: false
|
|
||||||
environment:
|
environment:
|
||||||
description: 'Environment variables'
|
description: 'Environment variables'
|
||||||
required: false
|
required: false
|
||||||
|
|
||||||
runs:
|
runs:
|
||||||
using: 'node20'
|
using: 'node16'
|
||||||
main: 'dist/index.js'
|
main: 'dist/index.js'
|
||||||
|
|
||||||
branding:
|
branding:
|
||||||
|
|
5
dist/index.js
vendored
5
dist/index.js
vendored
|
@ -2825,7 +2825,6 @@ let portainerUrl = core.getInput("portainerUrl")
|
||||||
const accessToken = core.getInput("accessToken")
|
const accessToken = core.getInput("accessToken")
|
||||||
const stackId = parseInt(core.getInput("stackId"))
|
const stackId = parseInt(core.getInput("stackId"))
|
||||||
const endpointId = parseInt(core.getInput("endpointId"))
|
const endpointId = parseInt(core.getInput("endpointId"))
|
||||||
const repositoryAuthentication = core.getInput("repositoryAuthentication")
|
|
||||||
const environmentVariables = core.getInput("environment")
|
const environmentVariables = core.getInput("environment")
|
||||||
|
|
||||||
if (isNaN(stackId)) {
|
if (isNaN(stackId)) {
|
||||||
|
@ -2856,10 +2855,6 @@ const postDataObject = {
|
||||||
pullImage: true,
|
pullImage: true,
|
||||||
}
|
}
|
||||||
|
|
||||||
if (repositoryAuthentication === true || repositoryAuthentication === 'true') {
|
|
||||||
postDataObject.repositoryAuthentication = true
|
|
||||||
}
|
|
||||||
|
|
||||||
if (environmentVariables !== undefined && environmentVariables !== "") {
|
if (environmentVariables !== undefined && environmentVariables !== "") {
|
||||||
postDataObject.env = JSON.parse(environmentVariables)
|
postDataObject.env = JSON.parse(environmentVariables)
|
||||||
}
|
}
|
||||||
|
|
5
index.js
5
index.js
|
@ -6,7 +6,6 @@ let portainerUrl = core.getInput("portainerUrl")
|
||||||
const accessToken = core.getInput("accessToken")
|
const accessToken = core.getInput("accessToken")
|
||||||
const stackId = parseInt(core.getInput("stackId"))
|
const stackId = parseInt(core.getInput("stackId"))
|
||||||
const endpointId = parseInt(core.getInput("endpointId"))
|
const endpointId = parseInt(core.getInput("endpointId"))
|
||||||
const repositoryAuthentication = core.getInput("repositoryAuthentication")
|
|
||||||
const environmentVariables = core.getInput("environment")
|
const environmentVariables = core.getInput("environment")
|
||||||
|
|
||||||
if (isNaN(stackId)) {
|
if (isNaN(stackId)) {
|
||||||
|
@ -37,10 +36,6 @@ const postDataObject = {
|
||||||
pullImage: true,
|
pullImage: true,
|
||||||
}
|
}
|
||||||
|
|
||||||
if (repositoryAuthentication === true || repositoryAuthentication === 'true') {
|
|
||||||
postDataObject.repositoryAuthentication = true
|
|
||||||
}
|
|
||||||
|
|
||||||
if (environmentVariables !== undefined && environmentVariables !== "") {
|
if (environmentVariables !== undefined && environmentVariables !== "") {
|
||||||
postDataObject.env = JSON.parse(environmentVariables)
|
postDataObject.env = JSON.parse(environmentVariables)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue