Skip to content

Commit bf02f20

Browse files
authored
Reduce warnings to info level with a warning icon (#397)
With direct WIF, there are now many legitimate use cases for not specifying a project_id or having a local checkout.
1 parent 51342a1 commit bf02f20

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

dist/main/index.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/main.ts

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -163,8 +163,8 @@ export async function run(logger: Logger) {
163163
// repository.
164164
const githubWorkspaceIsEmpty = await isEmptyDir(githubWorkspace);
165165
if (githubWorkspaceIsEmpty) {
166-
logger.warning(
167-
`The "create_credentials_file" option is true, but the current ` +
166+
logger.info(
167+
`⚠️ The "create_credentials_file" option is true, but the current ` +
168168
`GitHub workspace is empty. Did you forget to use ` +
169169
`"actions/checkout" before this step? If you do not intend to ` +
170170
`share authentication with future steps in this job, set ` +
@@ -198,9 +198,11 @@ export async function run(logger: Logger) {
198198

199199
// Set the project ID environment variables to the computed values.
200200
if (!projectID) {
201-
logger.warning(
202-
`Unable to compute project ID from inputs, skipping export. Please ` +
203-
`specify the "project_id" input directly.`,
201+
logger.info(
202+
`⚠️ Failed to a project ID from the given inputs. Neither the ` +
203+
`"project_id" output nor any environment variables will be ` +
204+
`exported. If you require these values in other steps, specify the ` +
205+
`"project_id" input directly.`,
204206
);
205207
} else {
206208
setOutput('project_id', projectID);

0 commit comments

Comments
 (0)