mirror of
https://github.com/JuliusFreudenberger/portainer-stack-git-redeploy-action.git
synced 2025-05-10 12:12:37 +02:00
Add toggle to support stack redeploy with git authentication
This commit is contained in:
parent
63d9c75bc2
commit
80a4523333
4 changed files with 18 additions and 0 deletions
5
dist/index.js
vendored
5
dist/index.js
vendored
|
@ -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)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue