Skip to content

Commit

Permalink
ci: update
Browse files Browse the repository at this point in the history
  • Loading branch information
MarleneJiang committed Jul 28, 2023
1 parent 91a168b commit fb10482
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 11 deletions.
20 changes: 15 additions & 5 deletions .github/actions-scripts/validate.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,21 @@ async function run() {
const response = await fetch(new URL(repository.replace(/[<>]/g, '')));
const data = await response.text();
const parsed = toml.parse(data);
console.log(parsed);
const content = {
"name": parsed.project.name,
"description": parsed.project.description,
"version": parsed.project.version,
"tags": parsed.project.keywords,
"url": parsed.project.urls.Repository,
"author": parsed.project.authors[0].name,
"pip": parsed.project.name,
"vertified": false,
"type": "plugin"
}
console.log(content);
setOutput('repository', repository);
setOutput('result','success');
setOutput('validation_output',parsed);
setOutput('validation_output',content);
} catch (e) {
setFailed(e);
return;
Expand All @@ -22,9 +33,8 @@ async function run() {
setOutput('result','failure');
setOutput('validation_output',{'a':'b'});
}


setOutput('repository', repository);
return;
}

await run();

7 changes: 2 additions & 5 deletions .github/workflows/templates/validation-succeeded.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
:white_check_mark: The extension [{{ .extension }}]({{ .share_link }}) is valid :tada:.
:white_check_mark: The extension {{ .extension }}

Now, @docker/extensions will authorise the publication of the extension to the marketplace.
Once the extension is published, this issue will be closed.

In the meantime, please tell us about your experience building a Docker Desktop extension here: https://survey.alchemer.com/s3/7184948/Publishers-Feedback-Form.
{{ .content }}
2 changes: 1 addition & 1 deletion .github/workflows/validation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ jobs:
template: .github/workflows/templates/validation-succeeded.md
vars: |
extension: ${{ needs.parse-issue.outputs.repository }}
share_link: ${{ needs.validate.outputs.share_link }}
content: ${{ needs.parse-issue.outputs.validation_output }}
- name: Add Comment
if: env.ACT == false
Expand Down

0 comments on commit fb10482

Please sign in to comment.