Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add flag to skip commits and pushes or be able to specify a dedicated branch for storing badges #2

Open
fkhoda opened this issue Oct 10, 2020 · 2 comments · Fixed by #3
Labels
enhancement New feature or request

Comments

@fkhoda
Copy link

fkhoda commented Oct 10, 2020

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

@danpetitt danpetitt added the enhancement New feature or request label Oct 16, 2020
@danpetitt danpetitt linked a pull request Oct 16, 2020 that will close this issue
@danpetitt
Copy link
Owner

danpetitt commented Oct 16, 2020

I have added a couple of new options; can you try them and see if they do what you wish - v1.0.10?

@christianfredh
Copy link

I created an empty branch gh-pages before this. And using this config:

    - name: OpenCover Badge Generator
      uses: danpetitt/[email protected]
      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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants