fix: avoid "ArtiomTr/jest-coverage-report-action" when running from a fork.

(cherry picked from commit 95df64516c59f4bbbffa21625af8f9be13da01af)
master
Jixun Wu 9 months ago committed by MengYX
parent c1aba5a10f
commit eb61d81817
No known key found for this signature in database
GPG Key ID: E63F9C7303E8F604
  1. 11
      .github/workflows/build.yml

@ -1,3 +1,5 @@
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
name: Test Build
on:
push:
@ -27,7 +29,14 @@ jobs:
steps:
- uses: actions/[email protected]
- run: npm ci
- uses: ArtiomTr/[email protected]
# note: forks can not access to GITHUB_TOKEN for coverage update.
# instead, we just ran the test in this case.
- name: Test only
if: github.event_name != 'push'
run: npm test
- name: Test + Publish Coverage
uses: ArtiomTr/[email protected]
if: github.event_name == 'push'
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
annotations: none

Loading…
Cancel
Save