Skip to content

Commit

Permalink
Set environment variables for application/job run
Browse files Browse the repository at this point in the history
  • Loading branch information
pflooky committed Jul 9, 2024
1 parent 7ae5efb commit def0379
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 2 deletions.
2 changes: 1 addition & 1 deletion badges/coverage.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

9 changes: 9 additions & 0 deletions src/insta-integration.js
Original file line number Diff line number Diff line change
Expand Up @@ -426,6 +426,15 @@ async function waitForDataGeneration(testConfig, sharedFolder) {

function runApplication(runConf, configFileDirectory) {
core.info('Running application/job')
// Check for env variables to run application/job
if (runConf.env) {
for (const env of Object.entries(runConf.env)) {
core.debug(
`Setting environment variable for application/job run, key=${env[0]}`
)
process.env[env[0]] = env[1]
}
}
try {
execSync(runConf.command, { cwd: configFileDirectory })
} catch (error) {
Expand Down

0 comments on commit def0379

Please sign in to comment.