forgejo/discussions
49
43

Future of Gitea Compatibility in Forgejo Actions #439

Open
opened 2026年01月22日 16:15:18 +01:00 by aahlenst · 1 comment

On Matrix, somebody reported a while ago that the gitea context no longer works with Forgejo Actions. For example, Forgejo and Forgejo Runner would both choke on the following workflow:

on:workflow_dispatch:push:jobs:test:runs-on:debiansteps:- run:| echo "forgejo.ref=${{ forgejo.ref }}"
 echo "github.ref=${{ github.ref }}"
 echo "gitea.ref=${{ gitea.ref }}"

Instead of printing

forgejo.ref=refs/heads/main
github.ref=refs/heads/main
gitea.ref=refs/heads/main

you'd get multiple errors:

Errors were found and although they tend to be cryptic the line number they refer to gives a hint as to where the problem might be.
Line: 6 Column 9: Failed to match job-factory: Line: 9 Column 15: Failed to match run-step: Line: 9 Column 20: Unknown Variable Access gitea
Line: 9 Column 15: Failed to match regular-step: Line: 9 Column 15: Unknown Property run
Line: 6 Column 9: Failed to match workflow-job: Line: 8 Column 9: Unknown Property steps
Forgejo Actions YAML Schema validation error
the workflow file is not usable

The problem was most likely introduced when workflow validation was added. gitea wasn't considered a valid context name when forge and forgejo were introduced. But the basic infrastructure still exists today.

Question: Should support for gitea be reinstated or removed for good?

Reasons for not bringing it back:

  • Demand seems low.
  • The current state of the Gitea compatibility is unknown. Only accepting gitea as a valid variable name and adding the necessary tests might not be sufficient.
  • If the Gitea folks ever decide to add custom features, Forgejo would have to follow suit to maintain compatibility.
On Matrix, somebody reported a while ago that the [`gitea`](https://docs.gitea.com/next/usage/actions/quickstart) context no longer works with Forgejo Actions. For example, Forgejo and Forgejo Runner would both choke on the following workflow: ```yaml on: workflow_dispatch: push: jobs: test: runs-on: debian steps: - run: | echo "forgejo.ref=${{ forgejo.ref }}" echo "github.ref=${{ github.ref }}" echo "gitea.ref=${{ gitea.ref }}" ``` Instead of printing ``` forgejo.ref=refs/heads/main github.ref=refs/heads/main gitea.ref=refs/heads/main ``` you'd get multiple errors: ``` Errors were found and although they tend to be cryptic the line number they refer to gives a hint as to where the problem might be. Line: 6 Column 9: Failed to match job-factory: Line: 9 Column 15: Failed to match run-step: Line: 9 Column 20: Unknown Variable Access gitea Line: 9 Column 15: Failed to match regular-step: Line: 9 Column 15: Unknown Property run Line: 6 Column 9: Failed to match workflow-job: Line: 8 Column 9: Unknown Property steps Forgejo Actions YAML Schema validation error the workflow file is not usable ``` The problem was most likely introduced when [workflow validation was added](https://code.forgejo.org/forgejo/runner/commit/65ae238f17a8459fafd3e2cc3b011b13db5b3dae). `gitea` wasn't considered a valid context name when [forge](https://code.forgejo.org/forgejo/runner/commit/062e57b1c7cc47632ec78eeb01c6c56ed083512a) and [forgejo](https://code.forgejo.org/forgejo/runner/commit/5c93da6fc74afb667c8d91854176f9b114e754a8) were introduced. But the [basic infrastructure still exists today](https://code.forgejo.org/forgejo/runner/src/commit/22fd08892ce48c96596b9568232990d462f4c11a/act/exprparser/interpreter.go#L166-L167). **Question**: Should support for `gitea` be reinstated or removed for good? Reasons for not bringing it back: * Demand seems low. * The current state of the Gitea compatibility is unknown. Only accepting `gitea` as a valid variable name and adding the necessary tests might not be sufficient. * If the Gitea folks ever decide to add custom features, Forgejo would have to follow suit to maintain compatibility.

I think it would make sense to "not bring it back", and possibly to follow-up and cleanup any remaining references to this support. It's a little unfortunate to have been lost without clear intent... but, it's not documented as supported from what I can see, and the value of spending time fixing it seems to be low as it hasn't come up in an issue for ~6 months of validation being present.

I think it would make sense to "not bring it back", and possibly to follow-up and cleanup any remaining references to this support. It's a little unfortunate to have been lost without clear intent... but, it's not documented as supported from what I can see, and the value of spending time fixing it seems to be low as it hasn't come up in an issue for ~6 months of validation being present.
Sign in to join this conversation.
No Branch/Tag specified
No results found.
No results found.
Labels
Clear labels
User research - Accessibility
Requires input about accessibility features, likely involves user testing.
User research - Blocked
Do not pick as-is! We are happy if you can help, but please coordinate with ongoing redesign in this area.
User research - Community
Community features, such as discovering other people's work or otherwise feeling welcome on a Forgejo instance.
User research - Config (instance)
Instance-wide configuration, authentication and other admin-only needs.
User research - Errors
How to deal with errors in the application and write helpful error messages.
User research - Filters
How filter and search is being worked with.
User research - Future backlog
The issue might be inspiring for future design work.
User research - Git workflow
AGit, fork-based and new Git workflow, PR creation etc
User research - Labels
Active research about Labels
User research - Moderation
Moderation Featuers for Admins are undergoing active User Research
User research - Needs input
Use this label to let the User Research team know their input is requested.
User research - Notifications/Dashboard
Research on how users should know what to do next.
User research - Rendering
Text rendering, markup languages etc
User research - Repo creation
Active research about the New Repo dialog.
User research - Repo units
The repo sections, disabling them and the "Add more" button.
User research - Security
User research - Settings (in-app)
How to structure in-app settings in the future?
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
forgejo/discussions#439
Reference in a new issue
forgejo/discussions
No description provided.
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?