1 Commits

Author SHA1 Message Date
Polina Sizintseva
266b34ee5e fix(deploy): respect WERF_ENV environment variable for converge and dismiss actions 2026-02-12 13:10:53 +03:00
8 changed files with 1481 additions and 1459 deletions

3
.gitignore vendored
View File

@@ -97,3 +97,6 @@ Thumbs.db
# Ignore built ts files # Ignore built ts files
__tests__/runner/* __tests__/runner/*
lib/**/* lib/**/*
# Intellij
/.idea

View File

@@ -12,9 +12,10 @@ inputs:
version: version:
description: 'The certain version' description: 'The certain version'
required: false required: false
env: env: # DEPRECATED: Use WERF_ENV environment variable instead (e.g., env: { WERF_ENV: value })
description: 'Specific deployment environment' description: 'Specific deployment environment'
required: true default: ''
required: false
github-token: github-token:
description: 'The GitHub token used to login and to interact with Docker Github Packages' description: 'The GitHub token used to login and to interact with Docker Github Packages'
default: ${{ github.token }} default: ${{ github.token }}

View File

@@ -12,8 +12,9 @@ inputs:
version: version:
description: 'The certain version' description: 'The certain version'
required: false 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' description: 'Specific deployment environment'
default: ''
required: false required: false
github-token: github-token:
description: 'The GitHub token used to login and to interact with Docker Github Packages' description: 'The GitHub token used to login and to interact with Docker Github Packages'

File diff suppressed because one or more lines are too long

View File

@@ -12,8 +12,9 @@ inputs:
version: version:
description: 'The certain version' description: 'The certain version'
required: false 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' description: 'Specific deployment environment'
default: ''
required: false required: false
github-token: github-token:
description: 'The GitHub token used to login and to interact with Docker Github Packages' description: 'The GitHub token used to login and to interact with Docker Github Packages'

File diff suppressed because one or more lines are too long

View File

@@ -3,7 +3,11 @@ import {PrepareEnvironAndRunWerfCommand} from './common'
async function run(): Promise<void> { async function run(): Promise<void> {
try { 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']) await PrepareEnvironAndRunWerfCommand(['converge'])
} catch (error) { } catch (error) {
core.setFailed(error.message) core.setFailed(error.message)

View File

@@ -3,7 +3,11 @@ import {PrepareEnvironAndRunWerfCommand} from './common'
async function run(): Promise<void> { async function run(): Promise<void> {
try { 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']) await PrepareEnvironAndRunWerfCommand(['dismiss'])
} catch (error) { } catch (error) {
core.setFailed(error.message) core.setFailed(error.message)