.github/workflows/lighthouse-pr-comment.yml #4042
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This is needed by GitHub limitations on PRs from forks, | |
# replace it when they resolve the issue with a more | |
# ergonomic system. | |
on: | |
workflow_run: | |
workflows: [lighthouse] | |
types: [completed] | |
jobs: | |
lighthouse-pr-comment: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: dawidd6/action-download-artifact@v2 | |
with: | |
name: lighthouse-pr-comment | |
run_id: ${{ github.event.workflow_run.id }} | |
- id: pr_number | |
run: | | |
export PR_NUM=$(ls lighthouse-pr-comment-*.txt | sed -n 's/lighthouse-pr-comment-\(.*\).txt/\1/p') | |
echo "pr_num=$PR_NUM" >> $GITHUB_OUTPUT | |
- uses: marocchino/sticky-pull-request-comment@v2 | |
with: | |
number: ${{ steps.pr_number.outputs.pr_num }} | |
path: lighthouse-pr-comment-${{ steps.pr_number.outputs.pr_num }}.txt |