Add toggle to support stack redeploy with git authentication

This commit is contained in:
Julius Freudenberger 2024-03-18 16:33:31 +01:00
parent 63d9c75bc2
commit 80a4523333
4 changed files with 18 additions and 0 deletions

5
dist/index.js vendored
View file

@ -2825,6 +2825,7 @@ let portainerUrl = core.getInput("portainerUrl")
const accessToken = core.getInput("accessToken")
const stackId = parseInt(core.getInput("stackId"))
const endpointId = parseInt(core.getInput("endpointId"))
const repositoryAuthentication = core.getInput("repositoryAuthentication")
const environmentVariables = core.getInput("environment")
if (isNaN(stackId)) {
@ -2855,6 +2856,10 @@ const postDataObject = {
pullImage: true,
}
if (repositoryAuthentication === true || repositoryAuthentication === 'true') {
postDataObject.repositoryAuthentication = true
}
if (environmentVariables !== undefined && environmentVariables !== "") {
postDataObject.env = JSON.parse(environmentVariables)
}