Skip to content

Commit 00d75d8

Browse files
authored
Update main.yml
1 parent f8f5345 commit 00d75d8

File tree

1 file changed

+17
-22
lines changed

1 file changed

+17
-22
lines changed

.github/workflows/main.yml

+17-22
Original file line numberDiff line numberDiff line change
@@ -55,28 +55,23 @@ jobs:
5555
uses: actions/github-script@v6
5656
with:
5757
script: |
58-
console.log("Full context object:");
59-
console.dir(context, { depth: null }); // Use console.dir for full object inspection
60-
61-
62-
63-
64-
65-
# const matrix = context.matrix;
66-
# const platform = matrix.group.platform;
67-
# const jobs = matrix.group.jobs;
68-
# console.log(`Calling container-upload workflow for platform: ${platform} with ${jobs.length} jobs`);
69-
70-
# await github.rest.actions.createWorkflowDispatch({
71-
# owner: context.repo.owner,
72-
# repo: context.repo.repo,
73-
# workflow_id: 'container-upload.yml', // Filename of the reusable workflow
74-
# ref: context.ref, // Or specify a branch/tag
75-
# inputs: {
76-
# platform: platform,
77-
# jobs: JSON.stringify(jobs) // Pass jobs as JSON string
78-
# }
79-
# });
58+
const matrix = JSON.parse(`
59+
${{ toJson(matrix) }}
60+
`);
61+
const platform = matrix.group.platform;
62+
const jobs = matrix.group.jobs;
63+
console.log(`Calling container-upload workflow for platform: ${platform} with ${jobs.length} jobs`);
64+
65+
await github.rest.actions.createWorkflowDispatch({
66+
owner: context.repo.owner,
67+
repo: context.repo.repo,
68+
workflow_id: 'container-upload.yml', // Filename of the reusable workflow
69+
ref: context.ref, // Or specify a branch/tag
70+
inputs: {
71+
platform: platform,
72+
jobs: JSON.stringify(jobs) // Pass jobs as JSON string
73+
}
74+
});
8075
8176
# codespace-upload:
8277
# env:

0 commit comments

Comments
 (0)