summaryrefslogtreecommitdiff
path: root/.github/workflows/membrowse-comment.yml
blob: a99c9db51886695c5fdc3bf8bdb099d87ff35ee4 (plain)
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
name: Membrowse Comment

on:
  workflow_run:
    workflows: ["Build"]
    types:
      - completed

jobs:
  post-comment:
    runs-on: ubuntu-latest
    if: >
      github.event.workflow_run.event == 'pull_request' &&
      github.event.workflow_run.conclusion != 'cancelled'
    permissions:
      actions: read
      pull-requests: write
    steps:
      - name: Checkout repository
        uses: actions/checkout@v6

      - name: Download Artifacts
        id: download
        uses: actions/download-artifact@v5
        with:
          run-id: ${{ github.event.workflow_run.id }}
          github-token: ${{ secrets.GITHUB_TOKEN }}
          name: membrowse-comment
          path: reports
        continue-on-error: true

      - name: Post Membrowse PR comment
        if: steps.download.outcome == 'success'
        uses: membrowse/membrowse-action/comment-action@v1
        with:
          json_files: 'reports/*.json'
        env:
          GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}