Skip to content

Commit

Permalink
core info
Browse files Browse the repository at this point in the history
  • Loading branch information
zacharyblasczyk committed Sep 25, 2024
1 parent d5639ea commit 7327027
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 18 deletions.
19 changes: 5 additions & 14 deletions github/fetch-job-inputs/index.js

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

9 changes: 5 additions & 4 deletions integrations/fetch-job-inputs/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import * as core from "@actions/core";

import { logger } from "@ctrlplane/logger";
import { Configuration, DefaultApi } from "@ctrlplane/node-sdk";

const config = new Configuration({
Expand All @@ -22,14 +21,16 @@ async function run() {
core.setOutput("environment_name", environment?.name);
core.setOutput("release_version", release?.version);

logger.info("config", config);
core.info(`Target name: ${target?.name}`);
core.info(`Environment name: ${environment?.name}`);
core.info(`Release version: ${release?.version}`);
core.info(`Config: ${JSON.stringify(config)}`);
core.info(`Variables: ${JSON.stringify(variables)}`);

for (const [key, value] of Object.entries(config)) {
logger.info("config", key, value);
core.setOutput(`config_${key}`, value);
}
for (const [key, value] of Object.entries(variables ?? {})) {
logger.info("variable", key, value);
core.setOutput(`variable_${key}`, value);
}
})
Expand Down

0 comments on commit 7327027

Please sign in to comment.