Skip to content

Comment on CI

Comment on CI #17

Workflow file for this run

name: Comment on CI
on:
workflow_run:
workflows:
- Build
- Check - Assets
- Check - Content and Data
- Check - Discord
- Check - Frontend
- Check - Makefile
- Check - Python
- Check - Templates
- Check - YAML
- Test - Scripts
- Test - Updater
types: [completed]
jobs:
comment:
if: github.event.workflow_run.event == 'pull_request'
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
issues: write
pull-requests: write
concurrency:
group: >-
ci-comment-${{ github.event.workflow_run.pull_requests[0].number ||
github.event.workflow_run.head_sha }}
cancel-in-progress: true
steps:
- name: Check out trusted reporter
uses: actions/checkout@v7
with:
ref: ${{ github.event.repository.default_branch }}
persist-credentials: false
sparse-checkout: scripts/report_ci.cjs
sparse-checkout-cone-mode: false
- name: Create or update CI comment as github-actions[bot]
uses: actions/github-script@v9
env:
# report_ci.cjs invokes `gh api` to download workflow artifacts.
GH_TOKEN: ${{ github.token }}
with:
github-token: ${{ github.token }}
script: |
const report = require(
`${process.env.GITHUB_WORKSPACE}/scripts/report_ci.cjs`
);
await report({ core, context, github });