Skip to content

Commit

Permalink
Merge pull request #124 from zeroqn/fix-v1-workflow-chatbot-get-polyj…
Browse files Browse the repository at this point in the history
…uice-sha1-fail

fix(ci): chatbot get polyjuice sha1 fail
  • Loading branch information
zeroqn authored Jun 10, 2022
2 parents 8352123 + 33096d9 commit 5e6366d
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions .github/workflows/integration-test-chat-bot-v1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,15 +56,15 @@ jobs:
htmlUrl: undefined,
manifest: {
godwoken: {
pattern: /"ref.component.godwoken-sha1": "(.{40})",/,
pattern: /"ref.component.godwoken-sha1": "(.{40})"/,
sha: undefined,
},
scripts: {
pattern: /"ref.component.godwoken-scripts-sha1": "(.{40})",/,
pattern: /"ref.component.godwoken-scripts-sha1": "(.{40})"/,
sha: undefined,
},
polyjuice: {
pattern: /"ref.component.godwoken-polyjuice-sha1": "(.{40})",/,
pattern: /"ref.component.godwoken-polyjuice-sha1": "(.{40})"/,
sha: undefined,
},
},
Expand Down Expand Up @@ -160,14 +160,16 @@ jobs:
const packagePage = JSON.stringify(
await github.request(`GET ${prebuilds.htmlUrl}`)
);
const manifestContesnt = packagePage.substring(packagePage.indexOf("Manifest"));
const manifestLabelsStart = packagePage.indexOf(""labels":");
const manifestLabelsEnd = packagePage.lastIndexOf("</pre>");
const manifestLabelsContent = packagePage.substring(manifestLabelsStart, manifestLabelsEnd);
for (const name in prebuilds.manifest) {
const label = prebuilds.manifest[name];
const match = label.pattern.exec(manifestContesnt);
const match = label.pattern.exec(manifestLabelsContent);
if (match) {
label.sha = match[1];
} else {
console.log(`${manifestContesnt}`);
console.log(`${manifestLabelsContent}`);
throw `${name}-sha1 not found`;
}
}
Expand Down

0 comments on commit 5e6366d

Please sign in to comment.