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

src: report the correct sticky disk key #57

Merged
merged 1 commit into from
Dec 3, 2024
Merged
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.

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

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -406,9 +406,9 @@ async function reportBuild(dockerfilePath: string) {
}
}

async function reportBuilderCreationFailed(stickydiskKey: string) {
async function reportBuilderCreationFailed() {
const requestOptions = {
stickydisk_key: stickydiskKey,
stickydisk_key: process.env.GITHUB_REPO_NAME || '',
repo_name: process.env.GITHUB_REPO_NAME || '',
region: process.env.BLACKSMITH_REGION || 'eu-central',
arch: process.env.BLACKSMITH_ENV?.includes('arm') ? 'arm64' : 'amd64',
Expand Down Expand Up @@ -553,7 +553,7 @@ actionsToolkit.run(
const dockerfilePath = context.getDockerfilePath(inputs);
if (!dockerfilePath) {
if (inputs.nofallback) {
await reportBuilderCreationFailed('');
await reportBuilderCreationFailed();
throw Error('Failed to resolve dockerfile path, and fallback is disabled');
} else {
core.warning('Failed to resolve dockerfile path, and fallback is enabled. Falling back to a local build.');
Expand All @@ -570,7 +570,7 @@ actionsToolkit.run(
exposeId: exposeId
};
if (!builderInfo.addr) {
await reportBuilderCreationFailed(dockerfilePath);
await reportBuilderCreationFailed();
if (inputs.nofallback) {
throw Error('Failed to obtain Blacksmith builder. Failing the build');
} else {
Expand Down
Loading