Open fkhoda opened 3 years ago
I have added a couple of new options; can you try them and see if they do what you wish - v1.0.10?
I created an empty branch gh-pages before this. And using this config:
- name: OpenCover Badge Generator
uses: danpetitt/open-cover-badge-generator-action@v1.0.10
with:
path-to-opencover-xml: ./tests/coverage.opencover.xml
path-to-badges: ./
minimum-coverage: 75
commit-badges: true
commit-branch-name: gh-pages
repo-token: ${{ secrets.GITHUB_TOKEN }}
First, got this error:
error: pathspec 'gh-pages' did not match any file(s) known to git
Due to git not knowing of the branch. Tried added a git fetch before the badge generation:
- name: Git fetch
run: git fetch
And this worked, the first time. Second time, got this error:
error: The following untracked working tree files would be overwritten by checkout:
coverage-badge-branch.svg
coverage-badge-line.svg
Please move or remove them before you switch branches.
So, it almost works, but not the whole way.
Hi,
Is it possible to add a flag to this action so that we can disable commits and pushes to the current branch or better be able to use a different branch? The reason behind is protective branches. Our master branch has push restrictions and we don't want to lift off this just for pushing badges.
Thanks, Fadil