-
Notifications
You must be signed in to change notification settings - Fork 6
43 lines (38 loc) · 1.42 KB
/
build-previews.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
name: Build previews
on:
workflow_run:
types:
- 'completed'
workflows:
- 'PR Checks'
jobs:
comment:
name: Add comment with extension preview builds
runs-on: ubuntu-24.04
if: github.repository == 'interledger/web-monetization-extension'
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Get workflow artifacts
uses: actions/github-script@v7
id: get-workflow-artifacts
with:
script: |
const script = require('./.github/actions/get-workflow-artifacts.cjs')
await script({ github, context, core })
- name: Find comment
if: ${{ steps.get-workflow-artifacts.outputs.conclusion != 'cancelled' }}
uses: peter-evans/find-comment@v3
id: find-comment
with:
issue-number: ${{ steps.get-workflow-artifacts.outputs.pr_number }}
comment-author: 'github-actions[bot]'
body-includes: '<!-- __WM_EXTENSION_BUILD_PREVIEWS__ -->'
- name: Add/Update comment
if: ${{ steps.get-workflow-artifacts.outputs.conclusion != 'cancelled' }}
uses: peter-evans/create-or-update-comment@v4
with:
comment-id: ${{ steps.find-comment.outputs.comment-id }}
issue-number: ${{ steps.get-workflow-artifacts.outputs.pr_number }}
body: ${{ steps.get-workflow-artifacts.outputs.comment_body }}
edit-mode: replace