fix(deploy): respect WERF_ENV environment variable for converge and dismiss actions

This commit is contained in:
Polina Sizintseva
2026-02-12 12:22:01 +03:00
committed by Aleksei Igrychev
parent 6ad28e741a
commit fcc652012a
8 changed files with 1481 additions and 1459 deletions
+4 -1
View File
@@ -96,4 +96,7 @@ Thumbs.db
# Ignore built ts files
__tests__/runner/*
lib/**/*
lib/**/*
# Intellij
/.idea
+3 -2
View File
@@ -12,9 +12,10 @@ inputs:
version:
description: 'The certain version'
required: false
env:
env: # DEPRECATED: Use WERF_ENV environment variable instead (e.g., env: { WERF_ENV: value })
description: 'Specific deployment environment'
required: true
default: ''
required: false
github-token:
description: 'The GitHub token used to login and to interact with Docker Github Packages'
default: ${{ github.token }}
+2 -1
View File
@@ -12,8 +12,9 @@ inputs:
version:
description: 'The certain version'
required: false
env: # TODO: Remove this deprecated werf option, which is not required anymore (use WERF_ENV variable instead)
env: # DEPRECATED: Use WERF_ENV environment variable instead (e.g., env: { WERF_ENV: value })
description: 'Specific deployment environment'
default: ''
required: false
github-token:
description: 'The GitHub token used to login and to interact with Docker Github Packages'
+730 -726
View File
File diff suppressed because one or more lines are too long
+2 -1
View File
@@ -12,8 +12,9 @@ inputs:
version:
description: 'The certain version'
required: false
env: # TODO: Remove this deprecated werf option, which is not required anymore (use WERF_ENV variable instead)
env: # DEPRECATED: Use WERF_ENV environment variable instead (e.g., env: { WERF_ENV: value })
description: 'Specific deployment environment'
default: ''
required: false
github-token:
description: 'The GitHub token used to login and to interact with Docker Github Packages'
+730 -726
View File
File diff suppressed because one or more lines are too long
+5 -1
View File
@@ -3,7 +3,11 @@ import {PrepareEnvironAndRunWerfCommand} from './common'
async function run(): Promise<void> {
try {
process.env.WERF_ENV = core.getInput('env')
// with.env parameter has priority over WERF_ENV environment variable
const envInput = core.getInput('env').trim()
if (envInput !== '') {
process.env.WERF_ENV = envInput
}
await PrepareEnvironAndRunWerfCommand(['converge'])
} catch (error) {
core.setFailed(error.message)
+5 -1
View File
@@ -3,7 +3,11 @@ import {PrepareEnvironAndRunWerfCommand} from './common'
async function run(): Promise<void> {
try {
process.env.WERF_ENV = core.getInput('env')
// with.env parameter has priority over WERF_ENV environment variable
const envInput = core.getInput('env').trim()
if (envInput !== '') {
process.env.WERF_ENV = envInput
}
await PrepareEnvironAndRunWerfCommand(['dismiss'])
} catch (error) {
core.setFailed(error.message)