Skip to content

Build previews

Build previews #1558

name: Build previews
on:
workflow_run:
types:
- 'completed'
workflows:
- 'PR Checks'
jobs:
comment:
name: Add comment with extension preview builds
runs-on: ubuntu-22.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