Skip to content

Commit 53e8bac

Browse files
committed
[wip] bundle stats
1 parent 8a0817a commit 53e8bac

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

.github/workflows/bundle-compare.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,21 +60,21 @@ jobs:
6060
owner: context.repo.owner,
6161
repo: context.repo.repo,
6262
workflow_id: 64771488 || context.payload.workflow_run.workflow_id,
63-
branch: 'main',
63+
branch: 'bundle-stats' || 'main',
6464
status: 'completed',
6565
per_page: 1,
6666
});
6767
68+
if (runs.length < 1) {
69+
throw new Error('No runs found!');
70+
}
71+
6872
const artifacts = await github.rest.actions.listWorkflowRunArtifacts({
6973
owner: context.repo.owner,
7074
repo: context.repo.repo,
7175
run_id: runs.data.workflow_runs[0].id,
7276
});
7377
74-
if (!runs) {
75-
throw new Error('No artifact found!');
76-
}
77-
7878
const artifact = artifacts.data.artifacts.find(a => a.name === 'webpack-stats');
7979
8080
if (!artifact) {

0 commit comments

Comments
 (0)