Skip to content

Commit

Permalink
Fix badge creation to really upload only master
Browse files Browse the repository at this point in the history
  • Loading branch information
EnricoMi committed May 28, 2022
1 parent c8ce9bb commit 5121f36
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/test-results.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,9 @@ jobs:

- name: Upload badge to Gist
# Upload only for master branch
if: github.ref == 'refs/heads/master'
if: >
github.event_name == 'workflow_run' && github.event.workflow_run.head_branch == 'master' ||
github.event_name != 'workflow_run' && github.ref == 'refs/heads/master'
uses: andymckay/append-gist-action@1fbfbbce708a39bd45846f0955ed5521f2099c6d
with:
token: ${{ secrets.GIST_TOKEN }}
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -516,7 +516,9 @@ steps:
- name: Upload badge to Gist
# Upload only for master branch
if: github.ref == 'refs/heads/master'
if: >
github.event_name == 'workflow_run' && github.event.workflow_run.head_branch == 'master' ||
github.event_name != 'workflow_run' && github.ref == 'refs/heads/master'
uses: andymckay/append-gist-action@1fbfbbce708a39bd45846f0955ed5521f2099c6d
with:
token: ${{ secrets.GIST_TOKEN }}
Expand Down

0 comments on commit 5121f36

Please sign in to comment.