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.