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 23, 2022
1 parent 096a45e commit b8402a4
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
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
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 b8402a4

Please sign in to comment.