mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-22 05:27:00 +02:00
chore(v2): fix PRs not able to add lighthouse/buildsize comment from works (#3846)
https://github.blog/2020-08-03-github-actions-improvements-for-fork-and-pull-request-workflows/
This commit is contained in:
parent
ad31facb32
commit
764d1fd191
2 changed files with 6 additions and 6 deletions
4
.github/workflows/build-size.yml
vendored
4
.github/workflows/build-size.yml
vendored
|
@ -1,9 +1,7 @@
|
||||||
name: Build Size
|
name: Build Size
|
||||||
|
|
||||||
on:
|
on:
|
||||||
# Trigger the workflow on pull request,
|
pull_request_target:
|
||||||
# but only for the master branch
|
|
||||||
pull_request:
|
|
||||||
branches:
|
branches:
|
||||||
- master
|
- master
|
||||||
|
|
||||||
|
|
8
.github/workflows/lighthouseCI.yml
vendored
8
.github/workflows/lighthouseCI.yml
vendored
|
@ -1,5 +1,7 @@
|
||||||
name: Lighthouse CI
|
name: Lighthouse CI
|
||||||
on: pull_request
|
|
||||||
|
on: pull_request_target
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
@ -53,8 +55,8 @@ jobs:
|
||||||
' ',
|
' ',
|
||||||
`*Lighthouse ran on [${Object.keys(links)[0]}](${Object.keys(links)[0]})*`
|
`*Lighthouse ran on [${Object.keys(links)[0]}](${Object.keys(links)[0]})*`
|
||||||
].join('\n')
|
].join('\n')
|
||||||
core.setOutput("comment", comment);
|
core.setOutput("comment", comment);
|
||||||
|
|
||||||
- name: Add Lighthouse stats as comment
|
- name: Add Lighthouse stats as comment
|
||||||
id: comment_to_pr
|
id: comment_to_pr
|
||||||
uses: marocchino/sticky-pull-request-comment@v2.0.0
|
uses: marocchino/sticky-pull-request-comment@v2.0.0
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue