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

Support skipping Gitea Action workflows [ci skip] [no ci] ... #28020

Closed
jacksgt opened this issue Nov 13, 2023 · 4 comments · Fixed by #28075
Closed

Support skipping Gitea Action workflows [ci skip] [no ci] ... #28020

jacksgt opened this issue Nov 13, 2023 · 4 comments · Fixed by #28075
Labels
topic/gitea-actions related to the actions of Gitea type/enhancement An improvement of existing functionality

Comments

@jacksgt
Copy link

jacksgt commented Nov 13, 2023

Description

Hello, thanks everyone for the awesome Gitea Actions feature!

GitHub Actions (and many other CI tools, too) has a feature that allows the user to skip running CI when a particular keyword is part of the commit message.
GitHub documentation: https://docs.github.com/en/actions/managing-workflow-runs/skipping-workflow-runs

You can skip workflow runs triggered by the push and pull_request events by including a command in your commit message:
[skip ci]
[ci skip]
[no ci]
[skip actions]
[actions skip]

It seems that this is currently not supported by Gitea (can anyone else confirm this?).
Short term, it should be added to the list of Unsupported features: https://docs.gitea.com/next/usage/actions/comparison
Medium term we should of course implement this feature.

Gitea Version

1.20.5

Can you reproduce the bug on the Gitea demo site?

Yes

Log Gist

No response

Screenshots

Screenshot 2023-11-13 at 16-56-33 blog

Git Version

No response

Operating System

No response

How are you running Gitea?

Gitea Helm chart version 9.5.1: https://gitea.com/gitea/helm-chart/

Database

MySQL/MariaDB

@lunny lunny added type/enhancement An improvement of existing functionality topic/gitea-actions related to the actions of Gitea and removed type/bug labels Nov 14, 2023
@jacksgt
Copy link
Author

jacksgt commented Nov 15, 2023

I believe the check should be implemented here:

func matchPushEvent(commit *git.Commit, pushPayload *api.PushPayload, evt *jobparser.Event) bool {

lafriks pushed a commit that referenced this issue Nov 18, 2023
Adds the possibility to skip workflow execution if the commit message
contains a string like [skip ci] or similar.

The default strings are the same as on GitHub, users can also set custom
ones in app.ini

Reference:
https://docs.github.com/en/actions/managing-workflow-runs/skipping-workflow-runs

Close #28020
@jacksgt
Copy link
Author

jacksgt commented Nov 18, 2023 via email

@JhonyGabriel
Copy link

@lunny, following the thread, in my workflows,
at version 1.21, auto-cancellation of simultaneous jobs was implemented if the type event is push, like described in issue #25716. I would like to suggest that when using [ci skip] on the commit message, the running jobs will are not cancelled at all.

@denyskon
Copy link
Member

@JhonyGabriel It should already work that way. The skip ci check happens before the auto-cancellation, so running workflows are not being cancelled if there's a skip ci string in the commit

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 7, 2024
fuxiaohei pushed a commit to fuxiaohei/gitea that referenced this issue Jan 17, 2024
Adds the possibility to skip workflow execution if the commit message
contains a string like [skip ci] or similar.

The default strings are the same as on GitHub, users can also set custom
ones in app.ini

Reference:
https://docs.github.com/en/actions/managing-workflow-runs/skipping-workflow-runs

Close go-gitea#28020
silverwind pushed a commit to silverwind/gitea that referenced this issue Feb 20, 2024
Adds the possibility to skip workflow execution if the commit message
contains a string like [skip ci] or similar.

The default strings are the same as on GitHub, users can also set custom
ones in app.ini

Reference:
https://docs.github.com/en/actions/managing-workflow-runs/skipping-workflow-runs

Close go-gitea#28020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
topic/gitea-actions related to the actions of Gitea type/enhancement An improvement of existing functionality
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants