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

CI Skip by default #7

Closed
MikeDevresse opened this issue Jan 28, 2021 · 4 comments
Closed

CI Skip by default #7

MikeDevresse opened this issue Jan 28, 2021 · 4 comments

Comments

@MikeDevresse
Copy link

Commiting that the badge is changing is triggering github actions to run again. I don't know if you can configure that in your github action but maybe adding documentation may do the job. I found that if you add the following line and you add [ci skip] in your commit then it might skip the github action.

jobs:
  build:
    runs-on: ubuntu-latest
    if: "!contains(github.event.head_commit.message, '[ci skip]')"
@MikeDevresse
Copy link
Author

Another options would be to host the badge on a specific branch or not in our repo, on a website for exemple. It kinda mess with legit commits

@timkrase
Copy link
Owner

Commiting that the badge is changing is triggering github actions to run again. I don't know if you can configure that in your github action but maybe adding documentation may do the job. I found that if you add the following line and you add [ci skip] in your commit then it might skip the github action.

jobs:
  build:
    runs-on: ubuntu-latest
    if: "!contains(github.event.head_commit.message, '[ci skip]')"

I'll have a look at this later. As far as I know, default behavior for GitHub Actions should be not to trigger the action again when pushing out of an action. Thanks for the suggested workaround, I'll check out if there's anything else I can do and otherwise would add it to the documentation if that's okay for you.

Another options would be to host the badge on a specific branch or not in our repo, on a website for exemple. It kinda mess with legit commits

I played around with the different branch idea too because I was annoyed by the bloated commit history. This solution has the problem though that it does not allow to link the badge from the readme as easily. Right now, if you link the badge just by the filename and relative to the repository you'll always get the right badge in the readme of every branch. If the badge is on a separate branch you'd have to adjust the readme for every branch to point to the right badge.

I'm also against hosting the badge on a separate website because that would create a dependency outside of GitHub, which I'd like to avoid.

As a first step I'll remove that the clover file is also committed to keep the commit history cleaner.

Another option would be to only run the action on the main/master so a new badge is only generated when merging another branch.

@MikeDevresse
Copy link
Author

You may also be able to squash your commit with the github action’s triggering one

timkrase added a commit that referenced this issue Mar 28, 2022
@timkrase
Copy link
Owner

I'm currently not really working on this anymore (and the options are limited anyway) so a better solution is out of sight. Therefore, I added your example as a possible workaround to the readme, thanks!

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

No branches or pull requests

2 participants