-
Notifications
You must be signed in to change notification settings - Fork 976
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
Support [skip ci] out of box with github actions #774
Comments
some caveat of edge case is, one push could have multi commits, what's the expected behavior when some commits has |
@missedone I'd say that so long as its behavior is documented, then either way would work. The way that CircleCI handles it is to make the build skip for all pushed commits in a batch, as documented here. |
@eseay , good to know. |
i'm thinking can this be extended to PR title, Ex. if the title contains |
@missedone Yea that could be a cool addition as well! |
Really surprised this feature is not available out of the box. Please add. |
+1 |
I created an action for that: https://github.com/marketplace/actions/ci-skip-action |
A github community post related to this issue can be found here:
I think the CI should behave the same as how it acts when pushing several commits. The simplicity of checking only the latest commit for a skip CI tag is nice and leaves less corner cases.
Its harder to make it work for everyone and in all cases if you have to consider the other commits also. I have previously found that a clever feature (documented or not) to build the latest commit without the skip CI tag was harmful. |
yoinked this out of that community post (https://github.521000.bestmunity/t/github-actions-does-not-respect-skip-ci/17325) name: my CI github action
on:
push:
branches:
- master
jobs:
build:
if: "!contains(github.event.head_commit.message, 'skip ci')"
runs-on: ubuntu-latest then if "skip ci" is in the commit message, it will skip it (haven't tested this myself). However, still a pain to include this in every repo that needs it, and having it on by default would be nice (not many commit messages have "skip ci" in them without intending to skip ci :P) |
This comment has been minimized.
This comment has been minimized.
|
This is now the most upvoted issue. https://github.com/actions/runner/issues?q=is%3Aissue+is%3Aopen+sort%3Areactions-%2B1-desc |
Curious: wouldn't support for a workflow |
@neverendingqs a workflow |
I think you may be thinking of the jobs |
I understand we don't have workflow |
Emphasis mine. The bolded part sounded like exactly what I was trying to make a case against. 😨 I pushed the following commits in a single push, the topmost commit being HEAD, and the build was not skipped:
|
You might want to open an issue as a bug. They closed this feature request already. |
> See actions/runner#774. [skip ci]
> See actions/runner#774. [skip ci]
I came here after seeing https://github.blog/changelog/2021-02-08-github-actions-skip-pull-request-and-push-workflows-with-skip-ci and wanting to express a desire for this to be configurable per workflow file. Essentially, it'd be nice for Regarding these comments:
That makes sense. But what if there was a more limited option that didn't need everything a regular What if workflow definitions could include a boolean field to opt into/out of this behavior? In which case that logic could become: That'd be good enough for opting into the ...But what'd be really neat is if we could take it one step further, like in @timharris777's initial example. This would be a bit more complex, but much more flexible: name: foo workflow
on: pull_request
skip_if_commit_message_includes:
- [skip foo workflow] name: bar workflow
on: pull_request
skip_if_commit_message_includes:
- [skip bar workflow]
- [skip ci] which would require the logic changing to something like list = workflow_definition.skip_if_commit_message_includes
if list.present? && list.any? { |flag| commit_message.includes?(flag) } That still doesn't seem too far off from the logic that currently has to run - it's nowhere near as dynamic as a general (Perhaps the |
This seems like a nice change but it is a breaking one and I think should be opt-in. On our repo we auto merge dependabot prs when the checks have run, and we include 'skip ci' to prevent Netlify running. Now it's impossible to merge dependabot prs because the required status checks never run. Please could this be reverted and made an option somewhere? |
@tjenkinson wouldn't |
If that works, yes. Will give it a go :) |
@abitrolly thanks it seems that works! Can't find it mentioned in any Netlify docs though. |
@tjenkinson I would still raise an issue with Netlify. Just to make sure it is an officially supported feature. |
> See actions/runner#774. [skip ci]
[skip ci] not working for my PR. |
I don't think that's a bug. The HEAD commit obviously does not contain any elements required to skip, therefore since both were pushed at once, actions will not be skipped |
I guess I misunderstood this part because it still initiated the action:
I'm guessing I'll have to remember adding [skip ci] again into GitHub.com's pull request commit message (from the individual PR page) or am I misunderstanding? BitBucket didn't need this extra step. |
Havent used bitbucket for CI, but sounds like a bug as their faq does not say it would do that. Or maybe you did squash or similar that included the skip ci in the commit message from previous commits. I couldnt find a proper documentation with a quick search about how it should work there, other than the faq.
Yes. The head commit of a push/pull request needs the [skip ci]. See here for the current docs: https://docs.github.com/en/actions/managing-workflow-runs/skipping-workflow-runs
The blogpost is wrong. I posted my tests earlier in this thread.
In the end the documentation has been rewritten multiple times and no longer seems to have the issue. It no longer resides in the same place even. |
Is there a way to disable this new In my pipeline, I don't see any legitimate use case for disabling CI through a commit message. Some developers on my team use |
Pretty much every other ci/cd solution will skip running a workflow/pipeline if
[skip_ci]
is in the commit text.Currently the hack for this is to add an
if
statement to jobs with something like"! contains(toJSON(github.event.commits.*.message), '[skip-ci]')"
. However, this still runs the workflow, just not any jobs with the condition.Please provide an out of box way for this to happen. One solution would be something like paths-ignore:
@eseay
The text was updated successfully, but these errors were encountered: