Skip to content

Post CI Dashboard Link #9319

Post CI Dashboard Link

Post CI Dashboard Link #9319

name: Post CI Dashboard Link
on:
workflow_run:
workflows: ["PR CI"]
types: [completed]
permissions:
actions: read
contents: read
issues: write
pull-requests: write
jobs:
post-link:
if: github.event.workflow_run.event == 'pull_request'
runs-on: ubuntu-22.04
steps:
- name: Download PR CI recap script
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SCRIPT_REF: ${{ github.workflow_sha }}
run: |
gh api \
-H "Accept: application/vnd.github.raw" \
"/repos/${GITHUB_REPOSITORY}/contents/utils/update_pr_ci_dashboard_recap.py?ref=${SCRIPT_REF}" \
> update_pr_ci_dashboard_recap.py
gh api \
-H "Accept: application/vnd.github.raw" \
"/repos/${GITHUB_REPOSITORY}/contents/utils/github_utils.py?ref=${SCRIPT_REF}" \
> github_utils.py
- name: Update PR CI recap
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: python3 update_pr_ci_dashboard_recap.py
post-mlinter-review:
if: always() && github.event.workflow_run.event == 'pull_request'
needs: post-link
runs-on: ubuntu-22.04
steps:
- name: Checkout repo (for post_mlinter_review.py and github_utils.py)
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Download mlinter findings artifact
id: download
continue-on-error: true
uses: actions/download-artifact@v4
with:
name: mlinter-findings
path: ${{ runner.temp }}/mlinter-findings
run-id: ${{ github.event.workflow_run.id }}
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Post mlinter review
if: steps.download.outcome == 'success'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
MLINTER_FINDINGS_DIR: ${{ runner.temp }}/mlinter-findings
run: python3 utils/post_mlinter_review.py "$MLINTER_FINDINGS_DIR"