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.
This commit is contained in:
parent
51342a1a91
commit
bf02f20c66
2
dist/main/index.js
vendored
2
dist/main/index.js
vendored
File diff suppressed because one or more lines are too long
12
src/main.ts
12
src/main.ts
@ -163,8 +163,8 @@ export async function run(logger: Logger) {
|
|||||||
// repository.
|
// repository.
|
||||||
const githubWorkspaceIsEmpty = await isEmptyDir(githubWorkspace);
|
const githubWorkspaceIsEmpty = await isEmptyDir(githubWorkspace);
|
||||||
if (githubWorkspaceIsEmpty) {
|
if (githubWorkspaceIsEmpty) {
|
||||||
logger.warning(
|
logger.info(
|
||||||
`The "create_credentials_file" option is true, but the current ` +
|
`⚠️ The "create_credentials_file" option is true, but the current ` +
|
||||||
`GitHub workspace is empty. Did you forget to use ` +
|
`GitHub workspace is empty. Did you forget to use ` +
|
||||||
`"actions/checkout" before this step? If you do not intend to ` +
|
`"actions/checkout" before this step? If you do not intend to ` +
|
||||||
`share authentication with future steps in this job, set ` +
|
`share authentication with future steps in this job, set ` +
|
||||||
@ -198,9 +198,11 @@ export async function run(logger: Logger) {
|
|||||||
|
|
||||||
// Set the project ID environment variables to the computed values.
|
// Set the project ID environment variables to the computed values.
|
||||||
if (!projectID) {
|
if (!projectID) {
|
||||||
logger.warning(
|
logger.info(
|
||||||
`Unable to compute project ID from inputs, skipping export. Please ` +
|
`⚠️ Failed to a project ID from the given inputs. Neither the ` +
|
||||||
`specify the "project_id" input directly.`,
|
`"project_id" output nor any environment variables will be ` +
|
||||||
|
`exported. If you require these values in other steps, specify the ` +
|
||||||
|
`"project_id" input directly.`,
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
setOutput('project_id', projectID);
|
setOutput('project_id', projectID);
|
||||||
|
Loading…
Reference in New Issue
Block a user