mirror of
https://github.com/openhwgroup/cva6.git
synced 2025-04-23 21:57:11 -04:00
Github action ci: Make GitHub accept notification from Dashboard (#1187)
This commit is contained in:
parent
a0893bce2b
commit
e894e86a7b
1 changed files with 33 additions and 0 deletions
33
.github/workflows/dashboard-done.yml
vendored
Normal file
33
.github/workflows/dashboard-done.yml
vendored
Normal file
|
@ -0,0 +1,33 @@
|
|||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
pr_number:
|
||||
description: 'ID of the PR to comment'
|
||||
required: true
|
||||
type: string
|
||||
success:
|
||||
description: 'Is the workflow successful?'
|
||||
required: true
|
||||
type: boolean
|
||||
|
||||
permissions:
|
||||
pull-requests: write
|
||||
|
||||
jobs:
|
||||
welcome:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/github-script@v6
|
||||
with:
|
||||
script: |
|
||||
const inputs = context.payload.inputs
|
||||
const pr = inputs.pr_number
|
||||
const success = inputs.success == 'true'
|
||||
const status_text = success ? ":heavy_check_mark: successful" : ":x: failed"
|
||||
const url = `https://riscv-ci.pages.thales-invia.fr/dashboard/dashboard_cva6_${pr}.html`
|
||||
await github.rest.issues.createComment({
|
||||
issue_number: pr,
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
body: `${status_text} run, report available [here](${url}).`
|
||||
})
|
Loading…
Add table
Add a link
Reference in a new issue