Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include more debug output #423

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion dist/index.js

Large diffs are not rendered by default.

14 changes: 13 additions & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,14 @@
*/

import { EntryData } from 'archiver';
import { debug as logDebug, getInput, info as logInfo, setFailed, setOutput } from '@actions/core';
import {
debug as logDebug,
getInput,
info as logInfo,
isDebug,
setFailed,
setOutput,
} from '@actions/core';
import {
errorMessage,
parseBoolean,
Expand Down Expand Up @@ -162,6 +169,11 @@ async function run() {
delete cf.serviceConfig?.vpcConnectorEgressSettings;
}

if (isDebug()) {
const definition = JSON.stringify(cf, null, 2);
logDebug(`Compiled Cloud Function definition: ${definition}`);
}

// Deploy the Cloud Function
const resp = await client.deployFromLocalSource(cf, sourceDir, {
onZip: (sourceDir: string, zipPath: string) => {
Expand Down