Description
Internal CI/CD system
I propose to implement an internal CI/CD system that is compatible with Github workflows yaml
syntax, action yaml
syntax, and most action plugins. And this is in fact not only a CI/CD system, but you can also choose to not check out the code for some events for example, when an issue is posted, you want to reply to them, then you don't need to check out the code. You can just reply to that issue. So the sub-system name is bots
actions
, if you have a better name than that, please let me know.
Pros
- Migrated repositories from Github could easily reuse the actions workflow files
- Plugins could be copied from https://github.com/actions or https://gitea.com/actions to your self-hosted Gitea instances or any git service repository address
- Transparent for the CI/CD process. You can check out all workflow files and plugin codes you are using.
- Bring version management for your CI/CD scripts and plugins
- Customize your image. Github's image for
ubuntu-latest
is very big but Gitea now will usenode:16-buster
as the default image which is about 150MB and of course you could change it yourself.
Cons
- Images are maybe very big for those small devices and have to be changed when you have new dependencies.
- Many Gitea users are familiar with Drone/Woodpecker
- More feedbacks are welcome
Reference documentation
At the moment, we lack documents, but if you want to know more details about what Github Actions looks like, please visit https://docs.github.com/en/actions.
Names chosen
Different from Github's related sub-system's name, we call the plugins action
or actions
. One action
in fact is a repository with a file named action.yml
in the root, the repository is hosted in any git service server which could be gitea.com
, your self-hosted Gitea instance, and even github.com. There is a default configuration but we should also support absolute git URL as a plugin repository.
Task summary
There are many things need to do
- Secrets management Secrets storage with SecretKey encrypted #22142
- An event listener and task scheduler Implement actions #21937
- A stable communication protocol between Gitea and runners https://gitea.com/gitea/actions-proto-def
- A runner based on docker https://gitea.com/gitea/act_runner
- A UI that will show tasks and logs Implement actions #21937
- Some core actions are now in https://gitea.com/actions which currently are mirrors but may be changed if there are incompatible between Github API v3 and Gitea API v1
- Support absolute plugin address like
uses: https://github.com/peaceiris/actions-hugo@v2
https://gitea.com/gitea/act/pulls/14 - Artifact protocol compatible with Github's, some reports could be displayed in UI directly i.e. Golang standard coverage file Implement actions artifacts #22738
- Service support https://gitea.com/gitea/act/pulls/5
- Cron support chore(actions): support cron schedule task #26655
- Cache action https://gitea.com/gitea/act_runner/pulls/25
- The default plugin programming language is
Javascript/Typescript
, but we need to support more programming languages-
Python
https://gitea.com/gitea/act_runner/issues/44 -
Golang
-
Rust
-
PHP
- More
-
- Check tab in the pull request to list results on the pull request page so that we don't need to go to actions page
- Composite workflow, a workflow file could reference another workflow as a step.
Although we will have an internal CI/CD system Gitea will still be open to integrating external systems and will provide more features to make the integration smooth. The below tasks do not belong to the internal CI/CD system but are very important for integrating the external CI/CD system
- A standard protocol to get tasks and get logs back https://gitea.com/gitea/actions-proto-def