mirror of
https://github.com/go-gitea/gitea.git
synced 2026-03-14 11:56:41 -05:00
An internal CI/CD system compatible with Github actions workflow yaml syntax, action yaml syntax and most action plugins #6306
Closed
opened 2025-11-02 06:51:45 -06:00 by GiteaMirror
·
96 comments
No Branch/Tag Specified
main
release/v1.25
release/v1.24
release/v1.23
release/v1.22
release/v1.21
release/v1.20
release/v1.19
release/v1.18
release/v1.17
release/v1.16
release/v1.15
release/v1.14
release/v1.13
release/v1.12
release/v1.11
release/v1.10
release/v1.9
release/v1.8
v1.25.3
v1.25.2
v1.25.1
v1.25.0
v1.24.7
v1.25.0-rc0
v1.26.0-dev
v1.24.6
v1.24.5
v1.24.4
v1.24.3
v1.24.2
v1.24.1
v1.24.0
v1.23.8
v1.24.0-rc0
v1.25.0-dev
v1.23.7
v1.23.6
v1.23.5
v1.23.4
v1.23.3
v1.23.2
v1.23.1
v1.23.0
v1.23.0-rc0
v1.24.0-dev
v1.22.6
v1.22.5
v1.22.4
v1.22.3
v1.22.2
v1.22.1
v1.22.0
v1.23.0-dev
v1.22.0-rc1
v1.21.11
v1.22.0-rc0
v1.21.10
v1.21.9
v1.21.8
v1.21.7
v1.21.6
v1.21.5
v1.21.4
v1.21.3
v1.21.2
v1.20.6
v1.21.1
v1.21.0
v1.21.0-rc2
v1.21.0-rc1
v1.20.5
v1.22.0-dev
v1.21.0-rc0
v1.20.4
v1.20.3
v1.20.2
v1.20.1
v1.20.0
v1.19.4
v1.21.0-dev
v1.20.0-rc2
v1.20.0-rc1
v1.20.0-rc0
v1.19.3
v1.19.2
v1.19.1
v1.19.0
v1.19.0-rc1
v1.20.0-dev
v1.19.0-rc0
v1.18.5
v1.18.4
v1.18.3
v1.18.2
v1.18.1
v1.18.0
v1.17.4
v1.18.0-rc1
v1.19.0-dev
v1.18.0-rc0
v1.17.3
v1.17.2
v1.17.1
v1.17.0
v1.17.0-rc2
v1.16.9
v1.17.0-rc1
v1.18.0-dev
v1.16.8
v1.16.7
v1.16.6
v1.16.5
v1.16.4
v1.16.3
v1.16.2
v1.16.1
v1.16.0
v1.15.11
v1.17.0-dev
v1.16.0-rc1
v1.15.10
v1.15.9
v1.15.8
v1.15.7
v1.15.6
v1.15.5
v1.15.4
v1.15.3
v1.15.2
v1.15.1
v1.14.7
v1.15.0
v1.15.0-rc3
v1.14.6
v1.15.0-rc2
v1.14.5
v1.16.0-dev
v1.15.0-rc1
v1.14.4
v1.14.3
v1.14.2
v1.14.1
v1.14.0
v1.13.7
v1.14.0-rc2
v1.13.6
v1.13.5
v1.14.0-rc1
v1.15.0-dev
v1.13.4
v1.13.3
v1.13.2
v1.13.1
v1.13.0
v1.12.6
v1.13.0-rc2
v1.14.0-dev
v1.13.0-rc1
v1.12.5
v1.12.4
v1.12.3
v1.12.2
v1.12.1
v1.11.8
v1.12.0
v1.11.7
v1.12.0-rc2
v1.11.6
v1.12.0-rc1
v1.13.0-dev
v1.11.5
v1.11.4
v1.11.3
v1.10.6
v1.12.0-dev
v1.11.2
v1.10.5
v1.11.1
v1.10.4
v1.11.0
v1.11.0-rc2
v1.10.3
v1.11.0-rc1
v1.10.2
v1.10.1
v1.10.0
v1.9.6
v1.9.5
v1.10.0-rc2
v1.11.0-dev
v1.10.0-rc1
v1.9.4
v1.9.3
v1.9.2
v1.9.1
v1.9.0
v1.9.0-rc2
v1.10.0-dev
v1.9.0-rc1
v1.8.3
v1.8.2
v1.8.1
v1.8.0
v1.8.0-rc3
v1.7.6
v1.8.0-rc2
v1.7.5
v1.8.0-rc1
v1.9.0-dev
v1.7.4
v1.7.3
v1.7.2
v1.7.1
v1.7.0
v1.7.0-rc3
v1.6.4
v1.7.0-rc2
v1.6.3
v1.7.0-rc1
v1.7.0-dev
v1.6.2
v1.6.1
v1.6.0
v1.6.0-rc2
v1.5.3
v1.6.0-rc1
v1.6.0-dev
v1.5.2
v1.5.1
v1.5.0
v1.5.0-rc2
v1.5.0-rc1
v1.5.0-dev
v1.4.3
v1.4.2
v1.4.1
v1.4.0
v1.4.0-rc3
v1.4.0-rc2
v1.3.3
v1.4.0-rc1
v1.3.2
v1.3.1
v1.3.0
v1.3.0-rc2
v1.3.0-rc1
v1.2.3
v1.2.2
v1.2.1
v1.2.0
v1.2.0-rc3
v1.2.0-rc2
v1.1.4
v1.2.0-rc1
v1.1.3
v1.1.2
v1.1.1
v1.1.0
v1.0.2
v1.0.1
v1.0.0
v0.9.99
Labels
Clear labels
$20
$250
$50
$500
backport/done
💎 Bounty
docs-update-needed
good first issue
hacktoberfest
issue/bounty
issue/confirmed
issue/critical
issue/duplicate
issue/needs-feedback
issue/not-a-bug
issue/regression
issue/stale
issue/workaround
lgtm/need 2
modifies/api
modifies/translation
outdated/backport/v1.18
outdated/theme/markdown
outdated/theme/timetracker
performance/bigrepo
performance/cpu
performance/memory
performance/speed
pr/breaking
proposal/accepted
proposal/rejected
pr/wip
pull-request
reviewed/wontfix
💰 Rewarded
skip-changelog
status/blocked
topic/accessibility
topic/api
topic/authentication
topic/build
topic/code-linting
topic/commit-signing
topic/content-rendering
topic/deployment
topic/distribution
topic/federation
topic/gitea-actions
topic/issues
topic/lfs
topic/mobile
topic/moderation
topic/packages
topic/pr
topic/projects
topic/repo
topic/repo-migration
topic/security
topic/theme
topic/ui
topic/ui-interaction
topic/ux
topic/webhooks
topic/wiki
type/bug
type/deprecation
type/docs
type/enhancement
type/feature
type/miscellaneous
type/proposal
type/question
type/refactoring
type/summary
type/testing
type/upstream
Mirrored from GitHub Pull Request
Milestone
No items
No Milestone
Projects
Clear projects
No project
No Assignees
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/gitea#6306
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @lunny on GitHub (Nov 13, 2020).
Internal CI/CD system
I propose to implement an internal CI/CD system that is compatible with Github workflows
yamlsyntax, actionyamlsyntax, 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 isbotsactions, if you have a better name than that, please let me know.Pros
ubuntu-latestis very big but Gitea now will usenode:16-busteras the default image which is about 150MB and of course you could change it yourself.Cons
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
actionoractions. Oneactionin fact is a repository with a file namedaction.ymlin the root, the repository is hosted in any git service server which could begitea.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
uses: https://github.com/peaceiris/actions-hugo@v2https://gitea.com/gitea/act/pulls/14Javascript/Typescript, but we need to support more programming languagesPythonhttps://gitea.com/gitea/act_runner/issues/44GolangRustPHPAlthough 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
@a1012112796 commented on GitHub (Nov 15, 2020):
tips about api for ci tools to repot detail message:
the stype of data that provide by api
example in gitee

do some calculate and show some usefull data on ui.
then user can design a sample ci tools which not need it's own ui :)
style:
example on gh

@Be-ing commented on GitHub (Mar 12, 2021):
Can you clarify what this will entail? Would this mean GitHub Actions could run on a github.com mirror of a repo and the results would appear on a Gitea server?
@lunny commented on GitHub (Mar 14, 2021):
That means Github actions could be running on Gitea(with this CI feature) servers(actually on user's agent, Gitea will only a coordinator and result saver).
Then mirrors/migrations of repositories from github/github enterprise could run the ci directly and no(or small) modification needed.
@a1012112796 commented on GitHub (Mar 14, 2021):
see
@moqmar commented on GitHub (Mar 30, 2021):
Would this be implemented by explicitly checking for a
.githubdirectory and sending those repos to the agent automatically on push using something like a global webhook? Because I think it would be great to not limit this to just GitHub Actions, but rather have a "global webhook" for pushes to an agent that can then decide what to do with that push - either using the GitHub Actions definitions, or for example running other CI implementations.@lunny commented on GitHub (Mar 30, 2021):
@moqmar Global webhooks have been implemented. The issue is to be compatible with actions for those migrations from github.
@ChristopherHX commented on GitHub (May 4, 2021):
I have been working on an external webhook endpoint for github actions self-hosted runners to use with my gitea instance or locally on any pc. This is basically a fork of the runner to be able to reuse their code for a missing aspnetcore server. During my tests I was able to use gitea almost like a ghes instance, some actions like
actions/checkout@v2have had minor incompatibilities with authentication.I would be glad to see endpoints for CI logs and have an integrated UI. Currently I have a basic react UI to display my logs, added as an external tab to gitea.
Experimental Usage
Download and extract https://github.com/ChristopherHX/runner.server/releases/latest for your system
Setup Gitea as an ghes endpoint, file
bin/appsettings.json, change the url fromhttp://localhost:5000to a different http url / portAdd
<url of Runner.Server>/runner/server/_apis/v1/Message(http://localhost:5000/runner/server/_apis/v1/Message) as a webhook (select gitea) for your repo, to enable actions.Setup https and use openid connect with gitea (Optional for Security, only working if the github actions server is using https)
bin/appsettings.jsoncert.pem(only a single certificate will work, no cert chain) ,key.pem)Add
<url of Runner.Server>/signin-oidc(https://localhost:5001/signin-oidc) as redirect url for the OAuth app in gitea.Start
bin/Runner.Server(.exe)Open
<url of Runner.Server>(http://localhost:5000,https://localhost:5001) to see if a job was receivedConfigure self-hosted runners, https://github.com/ChristopherHX/runner.server#advanced-usage
EDIT 2021/10/26
I added a ( temporary ) public test instance of runner.server connected to try.gitea.io
7ac850a3a9Press rerun workflow to see in progress job runsEDIT 2021/02/02
Fix openid sample config to actually have working https with pem
@techknowlogick commented on GitHub (May 4, 2021):
@ChristopherHX whoa! That's amazing!!
@Bobby99as commented on GitHub (Oct 26, 2021):
This seems nice
@silverwind commented on GitHub (Nov 25, 2022):
Regarding the name: I think "bot(s)" is too confusing with "robot(s)" which are automated user accounts. How about naming it "step(s)"? Most of the terminology that relates to "action(s)" would also apply to "step(s)".
@lunny commented on GitHub (Nov 25, 2022):
To diff from Github Actions, I don't think we should use actions as name.
Botsmight meansautomaticalbut notrobot, I'm not English native speaker and maybe there is a better name for it. This is really not only a CI/CD system, you can do more like below yml file.But I think maybe
step(s)is too small for this feature?@eeyrjmr commented on GitHub (Nov 25, 2022):
how about
automate@silverwind commented on GitHub (Nov 25, 2022):
It's well established even in non-english languages that bot is a program that impersonates a human.
So we are looking for a noun that signifies something being done. "Build" does qualify but is already occupied in the sense of it meaning to construct software. Some ideas maybe here.
@JakobDev commented on GitHub (Nov 25, 2022):
I personal think developing this makes no sense. As said in the start post, there are already working CI systems. It would make more sense to integrate e,.g. Woodpecker directly in Gitea instead of wasting a lot of development resources to develop something that already exists.
@silverwind commented on GitHub (Nov 25, 2022):
How about Task(s) or Job(s)? E.g. signifying a unit of work.
@lunny commented on GitHub (Nov 25, 2022):
They are different systems. Gitea could support both.
@6543 commented on GitHub (Nov 25, 2022):
well before merge we should make sure https://github.com/woodpecker-ci/woodpecker/issues/1385 is ready and gitea do support both equally
@6543 commented on GitHub (Nov 25, 2022):
As I pointed out, I don't like the feature-creep but as long as it is possible to disable it completely, I won't block this but also wont focus on fix it either ...
@markusamshove commented on GitHub (Nov 25, 2022):
What about Auteamate? 😋
Contains tea, a friendly mate and suggests automation
@kmk3 commented on GitHub (Nov 25, 2022):
Suggestions of boring and obvious names:
@kmk3 commented on GitHub (Nov 25, 2022):
Suggestions of tea-related names:
@williamdes commented on GitHub (Nov 25, 2022):
I would put this one first because the name is easy and stays in mind
Boring but just perfect for what it is 😄
@tobiasBora commented on GitHub (Nov 25, 2022):
Can't we stick to a vocabulary as close as possible to github's when possible? This would allow a faster transition from people coming from github, and ideally easy migrations. Of course, if they do incompatible things we should get a new name. I prefer the "boring" but descriptive terms like "task" compared to fancy unclear terms.
I agree that it would be awesome to have native gitea integration. But if it takes ressources, I agree it would be good to disable it to run it on low-end devices (I still want gitea to run on my raspberry pi).
@lunny commented on GitHub (Nov 26, 2022):
How about motions which is close to actions and short enough.
Or autos ?
@ghost commented on GitHub (Nov 26, 2022):
I just tried it and wrote a note:
https://gist.github.com/xin-u/f459c4805b348595e4981000b75443fe
@lunny commented on GitHub (Nov 26, 2022):
I don't think it's a
feature-creep. The issue has been opened for 2 years and I have announced I'm working on that in discord for many times. And I think a PR should be created when it's basically ready but not from the day 1.And I think Gitea should create a standard protocol and other external CI/CD tools could implement that to reuse Gitea's UI. Not only woodpecker, but also drone/jenkins and others could also implement the protocols to upload logs and etc. But I think that could be a standalone PR after a solid proposal.
@lafriks commented on GitHub (Nov 26, 2022):
Yes would be nice if ui had some kind of abstraction to allow implement other runners inside gitea (something ui wise I started once but had no time to finish)
https://github.com/go-gitea/gitea/compare/main...lafriks-fork:gitea:feat/gitea_builds?expand=1
This way you would not have to enable it specifically, you would have to just add global/org/user/repo runners and use them
@lunny commented on GitHub (Nov 26, 2022):
Looks like in your design, every runner type has his protocol and Gitea will implement different protocol for different runners?
@lunny commented on GitHub (Nov 30, 2022):
For the name, I think we can have a vote.
We have several choices here(sorry this is not the whole suggested names because I think we haven't so many emojis :))
continue in https://github.com/go-gitea/gitea/issues/13539#issuecomment-1332985355
@lafriks commented on GitHub (Nov 30, 2022):
yes but with common interface that needs to be implemented (like we have for webhooks or packages)
@BySempron commented on GitHub (Nov 30, 2022):
Is there only going to be one docker runner? Docker isn't the best in all setups, so I think we must have a "bare metal" runner which works without docker.
Just like AppVeyor default runner. Simply execute the commands you specify in your action file.
@ChristopherHX commented on GitHub (Nov 30, 2022):
@BySempron The fork of gitea I saw didn't include my PR for a native execution environment
https://github.com/nektos/act/pull/1293. I hope that this change will be pulled and made available.
@tobiasBora commented on GitHub (Nov 30, 2022):
If I can give maybe another application of bare runners proposed by @BySempron, it would be for Nix (actually a gitea-native Nix runner would be also really cool… and maybe even simpler to implement as compiling in nix is just a matter of providing build instructions in some
flake.nixfile at the root of the repository and typingnix build path-of-repo#name-programto compile… you can also add tests and more). This makes sense when compiling softwares "packaged" using Nix as Nix already provides a sandbox restricting the scope of the building process (for security purpose and purity). And it also gives for free some sort of cache sharing among builds (like if my first software packages a package A, and my second software uses A, when the CI builds A, it will automatically be available when compiling software B without any need of recompiling software A). Also, it shares the dependencies between completely unrelated repository automatically (like if two repositories build some LaTeX documentation using the same LaTeX version, LaTeX will be downloaded just once and automatically shared among builders).@eeyrjmr commented on GitHub (Nov 30, 2022):
fyi "Actions" already refers to a Gitea UI and thus to name the worker scripts "actions" can raise some ambiguity if someone refers to them.
@TheBrokenRail commented on GitHub (Nov 30, 2022):
Name-wise, what about Teapots, Pots, or Kettles? (You know, because teapot/tea kettle?)
I also like "Sips" which was suggested on the Discord.
@lunny commented on GitHub (Dec 1, 2022):
I think we can pull upstream code again in https://gitea.com/gitea/act and maybe you can help to send more PRs to these repositories.
@lunny commented on GitHub (Dec 1, 2022):
Ah, right. I think we have to change the menu name if
Actionswin.@lunny commented on GitHub (Dec 1, 2022):
@wolfogre commented on GitHub (Dec 1, 2022):
@ChristopherHX It's amazing! The forked act is trying to track the latest release of nektos/act, so I will follow up once a new version including the commit is released.
@kmk3 commented on GitHub (Dec 1, 2022):
@lunny Suggestion to add to the above list:
(It works both as a noun and as a verb, so you could have a
[Brew]button)@wolfogre commented on GitHub (Dec 1, 2022):
@kmk3 Excuse me, don't do that, please! 😂 I'm a user of homebrew, and typing
brew install ... brew upgrade ...everyday.@kmk3 commented on GitHub (Dec 1, 2022):
Ah yes, maybe the CLI usage could be different then, like
tea brew,gtborsomething (in which case the binary name for "Gitea Actions" could be rather
amusing).
Though would there even be a dedicated binary for this?
@lafriks commented on GitHub (Dec 1, 2022):
I think naming should be kept in UI as generic as possible to be able to integrate under that other CI information (Woodpecker CI, Jenkins etc) under it so imho Workflows would be generic enough not to hint to any exact product but be recognizable enough. CI/CD tool that is being developed as one of integration can be named than in some more specific name.
@wolfogre commented on GitHub (Dec 5, 2022):
I believe
Actionsis the final result. I know it's not perfect, but it's probably good enough for now.@gnat commented on GitHub (Dec 6, 2022):
Just rename the existing button to Manage (or whatever) and use Actions for this.
@ChristopherHX commented on GitHub (Dec 8, 2022):
@wolfogre Thank you for syncing nektos/act, however releases are currently just a monthly snapshot of master
You can now use this platform config
self-hosted:docker://-self-hostedto get a native execution environment. The name docker:// is now confusing in this specfic case, because this specfic platform tag is not using docker at all.@gnat commented on GitHub (Dec 18, 2022):
Wanted to say, as someone who uses a ton of Drone, it's going to be amazing to migrate to this new system and standardize on the Github actions format instead. Really looking forward to this.
@ibotty commented on GitHub (Jan 5, 2023):
As mentioned before, I'd really like to see different runners than only ones based on docker. There is a reason that the whole red hat influenced world moved away from docker.
But more importantly, I'd like to have a runner that runs the containers in a Kubernetes cluster. Will it be possible to use a different runner or is there tight integration? Is there some preliminary documentation besides the source on the api contract between gitea and the actions runner?
@lunny commented on GitHub (Jan 5, 2023):
The protocol repository is https://gitea.com/gitea/actions-proto-def. I think we can have more runners in future, but let's have one at first. A runner based on
actshould be the easiest way to make one.@sschuberth commented on GitHub (Jan 5, 2023):
I guess support for that would require to address https://github.com/nektos/act/issues/989#issuecomment-1156768547, which would be a great step towards running actions that leverage caches locally.
@ChristopherHX commented on GitHub (Jan 7, 2023):
I made a POC gitea actions runner proxy based on actions/runner, this doesn't use nektos/act for action execution and doesn't require docker.
https://gitea.com/ChristopherHX/actions_runner
Now two runner implementations for gitea actions.
Things, which act doesn't support, but are possible with this proxy runner
Bugs caused by the runnerv1 protocol, but are ok since it's experimental
Pre and Post steps are part of setup and complete job, steps not in the job are ignored by the server
@yekanchi commented on GitHub (Jan 17, 2023):
Great Job,
I feel most of the people using Gitea over Gitlab and Github enterprise use it because it does not need Linux/WSL/docker stuff.
Then I think actions runner being native is crucial for real cross platform support.
@MrHaroldA commented on GitHub (Jan 19, 2023):
I don't have the numbers, but why would anyone run Gitea on Windows instead of a server OS like Linux? I know it can run on Windows, but especially if you allow outside access you don't want a Windows machine connected to the "evil" internet.
Then again, I can understand the need for native runners for those who haven't containerized their services yet.
@kolaente commented on GitHub (Jan 19, 2023):
There's software you can only build on windows, like tauri (at least for now). I have worked on a project where you could only deploy the software by pushing it to a server in the client's internal network and the vpn they were using was only available on Windows. With a Windows runner it's possible to build pipelines for these use cases which otherwise would be not possible.
@MrHaroldA commented on GitHub (Jan 19, 2023):
Ah, Windows native runners and not "Gitea on Windows"; didn't think about that ;)
Carry on!
@jmg2k commented on GitHub (Jan 19, 2023):
Guess you've never heard about Windows Server then and probably also don't know how much easier it is to find administrators who know what they're doing.
@yekanchi commented on GitHub (Jan 19, 2023):
Linux servers are more popular over Windows server on the internet but there are many Enterprise Environments that reply on Active Directory stuff and and use Windows Servers, By the way my purpose was that among Gitea/Github/Gitlab, The Gitea is the only one support Deploying to Windows Servers. so all individuals or companies who stick with windows have no option but Gitea.
@ChristopherHX commented on GitHub (Jan 20, 2023):
Regarding absolute plugin address, please consider requiring to write a
http:///https://prefix for absolute addess plugins.In my opinion is
github.com/peaceiris/actions-hugo@v2ambigious due to the following reasons:uses: actions/cache/restore@v3is valid in github action, you cannot count slashes to resolve this parsing problemgithub.com, gitea (1.17.2, I'm too lazy to apply updates) doesn't forbid to use dot in names.What will happen if the DEFAULT_ACTION_URL is that gitea instance? I couldn't tell the difference of user
github.comand a dns name.I have no concerns regarding the following notation: uses:
https://github.com/peaceiris/actions-hugo@v2, it's very uncommon to repeat a/in a uses statement and easy to parse.@techknowlogick commented on GitHub (Jan 20, 2023):
@ChristopherHX those are very good points. To confirm, your suggestion is to treat anything that doesn't start with http/s as relative plugin to the default action url, but if it starts with http/s then use absolute? As I think that is a very reasonable suggestion.
@ChristopherHX commented on GitHub (Jan 20, 2023):
Yes exactly.
@ragnaros2046 commented on GitHub (Jan 22, 2023):
Will Gitea CI support buildpacks? https://buildpacks.io/
Cloud Native Buildpacks
transform your application source code into images that can run on any cloud.
@genofire commented on GitHub (Feb 25, 2023):
Why was not used the protocol between gitlab and there runner? this runner could be runned everywhere and start jobs in virtualbox, shell, kubernetes, docker ....
@wolfogre commented on GitHub (Feb 27, 2023):
GitLab runners are designed for .gitlab-ci.yml, however, what Gitea wants is Actions.
@genofire commented on GitHub (Feb 27, 2023):
But for Actions does not exists an good runner, with
service, running in kubernetes and so on.Why has gitea the same API then github?
@lunny commented on GitHub (Feb 28, 2023):
I think we can discuss the possibility of whether we can support that protocol and GitLab runners.
@ChristopherHX commented on GitHub (Feb 28, 2023):
An overview how Gitea Actions are different compared to GitHub Actions, bugs are included.
From act side
service container not implementedAvailable in latest builds of act_runner (Update 19. April 2023, no release yet)PATHof container / of act must containnodefor nodejs actions, github runner has their own copy for both container and hostruns-onsyntaxFrom gitea side
job results are not yet part of the protocol) (Work in Progress) (Update 19. April 2023)no reusable workflows (on act only partially implemented, not checked)partial reusable workflow support on the act_runner side (needs latest builds of gitea to pass with and secrets), GitHub does it on their server (Update 19. April 2023)step.ContinueOnErrorcannot be an expression, model is a copy in jobparser pkg of act forkNon functional differences
Things gitea have github don't
http(s)://protocol, similar todocker://This list has been originally posted in the gitea discord channel
EDIT last update 19. April 2023
@gnat commented on GitHub (Mar 10, 2023):
Encouraging for the "standardising on Actions" story for Gitea... from Django Developers Survey 2022.
I'm already converting many of my projects over for the Gitea transition to Actions.
@newbenji commented on GitHub (Mar 10, 2023):
but you still need build it yourself to test it?
@balki commented on GitHub (Mar 20, 2023):
For a mirror repository, Will it be possible to use different action instead of the one in the original repository?
For example, lets say the github action in https://github.com/go-gitea/gitea compiles gitea when a new tag is created with
TAGS="bindata sqlite sqlite_unlock_notify" make build.I set up a mirror repository at https://git.mydomain.com/me/gitea and in my gitea action, I would like to it to compile without sqlite support,
TAGS="bindata" make build.For this to work, the config cannot be inside
.githubor.giteafolder as that will cause conflict with original repository. Instead, we can have in a custom branch called.gitea-actions-branchwhich only contains the yaml config file for 'gitea action'.@ghost commented on GitHub (Mar 20, 2023):
I think it would be nice to be able to select which folder to use for Gitea Actions via a global and project level flag, with the project level flag taking priority.
That way Gitea Actions can ignore the
.githubfolder in favor of the.giteafolder.@panekj commented on GitHub (Mar 20, 2023):
You can't modify files in mirrored repository.
It will be better to have a event hook that will trigger actions in another repository, so mirror would trigger a hook, that hook triggers an actions run in another repository which will allow you to specify whatever you want.
@nodiscc commented on GitHub (Mar 21, 2023):
Gitea 1.19.0 was released with the initial actions implementation, but I do not see any mention of it at https://docs.gitea.io/. So maybe a new task should be added to the checklist in the issue description?
@wizpresso-steve-cy-fan commented on GitHub (Mar 22, 2023):
It is also well noted we will also need to add Helm chart for act
@kbingham commented on GitHub (Mar 30, 2023):
Being able to store the configuration in a custom branch would help a lot for adding automation to open source projects that don't want to have specific CI files added to the core repo. The linux kernel for instance.
@lunny commented on GitHub (Mar 30, 2023):
Maybe we can have some options:
.github/workflowsor.gitea/workflows@siegenthalerroger commented on GitHub (Mar 30, 2023):
I actually really like the idea of having a seperate repo analogous to the wiki repository for this. Would be interesting to explore other functionality that could be implemented in this way.
@kbingham commented on GitHub (Apr 1, 2023):
Yup now I've been exploring more, I can see a separated repo for the workflows could be a very helpful way of doing this too. Then multiple repos (mirrors, forks, or separate repos for separate developers) can point to common workflow actions.
@dsseng commented on GitHub (Apr 8, 2023):
Maybe after artifact upload is done, basic code intelligence (not as powerful as SourceGraph, but just goto definitions/references + browse file symbols) could be implemented. After finishing builds/tests the action might do something like
rust-analyzer lsif .and upload it as a special artifact Gitea will build navigation from. This approach gives the most detailed code navigation, just as in IDE using the same language server as used to generate LSIF. See https://lsif.dev/ for more details regarding the format.Didn't open a new issue because of dependency on artifacts
@prologic commented on GitHub (Apr 10, 2023):
Are there any docs on built-in actions in 1.19.0? Even just a quick bullet point here in this thread? 🙏
@prologic commented on GitHub (Apr 10, 2023):
Answering my own question, getting this up and running with Gitea v1.19.0 (from upstream Docker images) was pretty straight forward:
app.iniconfig (since if you're running an older version, it won't be there by default and disable by default?):That's it! 🥳 Now just add workflows in
.gitea/workflows/build.ymlwhich use the same syntax as Github actions? (I guess so since the runner being used is theact_runner).@prologic commented on GitHub (Apr 10, 2023):
Happy to continue beta testing this (I also run an older Drone CI setup too!) and provide feedback.
One thing that springs to mind (which I'm hoping one of the developers can answer):
Basically, instead of having a static pool of runners (however I choose to run them), it would be nice to have a webhook (globally) that I can listen on and spawn a new runner on demand (say in a virtual machine or similar). Thanks! 🙏
@aminify commented on GitHub (Apr 18, 2023):
Apparently in version 19.0.1 we should put something different in the
app.inifile. Can someone help with that?I put the below in it and actions weren't enabled. I used docker image by the way... I don't know if that's the source of issue. Really poor documentation so far...
@jimafisk commented on GitHub (Apr 18, 2023):
@aminify I think it's just:
https://docs.gitea.io/en-us/config-cheat-sheet/#actions-actions
@delvh commented on GitHub (Apr 18, 2023):
No, the cheatsheet is still true.
You simply misunderstood something here:
the key
DEFAULT_REPO_UNITS/DEFAULT_FORK_REPO_UNITSin the [repository] section used the valueactionsinstead ofrepo.actions.The section to enable actions is [actions].
@lunny commented on GitHub (Apr 18, 2023):
All units configuration should use
repo.actions, but the ini section is[actions].@RynoM commented on GitHub (Apr 18, 2023):
This would be nice! I've been tinkering with using it to deploy/restart my docker services. Would be nice if it could just do dynamic generation / access from outside for runner tokens. That way the container is more ephemeral.
Also its probably been said before, but an environment variable for enabling actions would be nice, instead of having to update
app.ini.@aminify commented on GitHub (Apr 19, 2023):
I have setup the runner and everything and I have a
docker buildcommand to run in my action. Unfortunately I get/var/run/act/workflow/1: line 2: docker: command not found. Anyone knows the best way to enable docker inside the runner?@panekj commented on GitHub (Apr 19, 2023):
You need to install it or use a docker image runner that has it installed
@aminify commented on GitHub (Apr 20, 2023):
thanks @panekj
for others facing the same issue. I managed to fix this
docker: command not foundissue usingubuntu-latest:docker://catthehacker/ubuntu:act-22.04as label argument foract-runner(in register phase)@sorenisanerd commented on GitHub (Apr 21, 2023):
Another missing part of Gitea's implementation of Github Actions is workflow commands in general, but most critically the
add-maskcommand. My logs are riddled with secrets that anyone can see and steal.@prologic commented on GitHub (Apr 21, 2023):
Wait?! Why are you logging secrets in the first place? 🤔
@vquie commented on GitHub (Apr 21, 2023):
I can confirm this. I use the 1password action to retrieve passwords. They are logged in all their beauty. Their code says
add-maskthough.@JakobDev commented on GitHub (Apr 21, 2023):
There are Programs who print API Keys for debug reasons with no Way to disable it. It also possible, that this may be leaked in a error message when something crashes, so it's generally a good Idea to mask this, just in case.
@kbingham commented on GitHub (Apr 21, 2023):
FWIW - Today I discovered gitlab can do this and it's all documented here:
@prologic commented on GitHub (Apr 21, 2023):
Those programs should be loaded up on a rocket and shot into sun! 😆 talk about security law practice 🤦♂️
@delvh commented on GitHub (Apr 30, 2023):
I wonder how much more we want to abuse this one issue?
As far as I'm concerned the basic functionality exists, and the remains should be extracted into separate issues.
I don't think it's good that this issue is still open despite the main functionality being implemented already.
Issues should focus on one specific thing, otherwise they'll be pretty much never closed.