Skip to content

Upload Flakiness.io report (fork PRs) #56

Upload Flakiness.io report (fork PRs)

Upload Flakiness.io report (fork PRs) #56

name: Upload Flakiness.io report (fork PRs)
on:
workflow_run:
# Must match the name(s) of workflows that produce flakiness-report artifacts
workflows: ["Tests"]
types: [completed]
jobs:
upload-flakiness-report:
runs-on: ubuntu-latest
if: >-
(github.event.workflow_run.conclusion == 'success' || github.event.workflow_run.conclusion == 'failure')
&& github.event.workflow_run.event == 'pull_request'
&& github.event.workflow_run.head_repository.full_name != github.event.workflow_run.repository.full_name
permissions:
actions: read
contents: read
id-token: write
steps:
- name: Install Flakiness CLI
run: curl -LsSf https://cli.flakiness.io/install.sh | sh
- name: Download flakiness-report artifacts
env:
GH_TOKEN: ${{ github.token }}
RUN_ID: ${{ github.event.workflow_run.id }}
run: gh run download "$RUN_ID" --repo "$GITHUB_REPOSITORY" --pattern 'flakiness-report-*' --dir .
- name: Upload to Flakiness.io
run: find . -path '*/flakiness-report-*/report.json' -exec flakiness upload {} \;