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:
Sébastien Lorber 2020-11-30 16:47:19 +01:00 committed by GitHub
parent ad31facb32
commit 764d1fd191
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 6 deletions

View file

@ -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

View file

@ -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