-
Notifications
You must be signed in to change notification settings - Fork 11.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[wallet-ext] Workflow run wallet extension (#4766)
* Workflow run wallet extension * Fix lint * Update workflow to hopefully work * Remove test change
- Loading branch information
1 parent
110dd6d
commit aa469e4
Showing
2 changed files
with
51 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
name: Wallet Extension PR Comment | ||
|
||
# NOTE: This workflow run indirection is used to securely comment on PRs when | ||
# wallet builds are completed. | ||
on: | ||
workflow_run: | ||
workflows: ["Wallet Extension PR Checks"] | ||
types: | ||
- completed | ||
|
||
jobs: | ||
upload: | ||
runs-on: ubuntu-latest | ||
if: > | ||
github.event.workflow_run.event == 'pull_request' && | ||
github.event.workflow_run.conclusion == 'success' | ||
steps: | ||
- name: "Download artifact" | ||
uses: actions/github-script@v6 | ||
id: get-artifact | ||
with: | ||
result-encoding: string | ||
script: | | ||
let allArtifacts = await github.rest.actions.listWorkflowRunArtifacts({ | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
run_id: context.payload.workflow_run.id, | ||
}); | ||
let matchArtifact = allArtifacts.data.artifacts.filter((artifact) => { | ||
return artifact.name == "wallet-extension" | ||
})[0]; | ||
if (!matchArtifact) { | ||
return ''; | ||
} | ||
return matchArtifact.archive_download_url; | ||
- name: Comment PR | ||
uses: thollander/actions-comment-pull-request@v1 | ||
if: steps.get-artifact.outputs.result != '' | ||
with: | ||
comment_includes: "💳 Wallet Extension" | ||
message: | | ||
💳 Wallet Extension has been built, you can download the packaged extension here: ${{steps.get-artifact.outputs.result}} | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters