Skip to content

Commit 94feef0

Browse files
authored
build: only push to report repo and create badge for upstream (#1748)
1 parent d8ad9a0 commit 94feef0

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

.github/workflows/coverage.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,9 @@ jobs:
235235
path: reports_repo/${{ env.report_dir }}
236236

237237
- name: "Push to report repo"
238-
if: ${{ github.ref == 'refs/heads/master' }}
238+
if: |
239+
github.repository_owner == 'nedbat'
240+
&& github.ref == 'refs/heads/master'
239241
env:
240242
COMMIT_MESSAGE: ${{ github.event.head_commit.message }}
241243
run: |
@@ -259,7 +261,9 @@ jobs:
259261
echo '[${{ env.url }}](${{ env.url }})' >> $GITHUB_STEP_SUMMARY
260262
261263
- name: "Create badge"
262-
if: ${{ github.ref == 'refs/heads/master' }}
264+
if: |
265+
github.repository_owner == 'nedbat'
266+
&& github.ref == 'refs/heads/master'
263267
# https://gist.githubusercontent.com/nedbat/8c6980f77988a327348f9b02bbaf67f5
264268
uses: schneegans/dynamic-badges-action@e9a478b16159b4d31420099ba146cdc50f134483
265269
with:

0 commit comments

Comments
 (0)