Add an environment variable for runner task so actions know it's running on a Gitea runner but not a Github runner #10627

Closed
opened 2025-11-02 09:13:18 -06:00 by GiteaMirror · 4 comments
Owner

Originally created by @lunny on GitHub (Apr 11, 2023).

Feature Description

It's convenient for actions author to do some modifications to support both Github Actions and Gitea Actions . The environment variable should be a persistent one and will be exposed in the documentation. The possible env names are

  • ON_GITEA_RUNNER

Screenshots

No response

Originally created by @lunny on GitHub (Apr 11, 2023). ### Feature Description It's convenient for actions author to do some modifications to support both Github Actions and Gitea Actions . The environment variable should be a persistent one and will be exposed in the documentation. The possible env names are - ON_GITEA_RUNNER ### Screenshots _No response_
GiteaMirror added the issue/confirmedtype/proposaltype/feature labels 2025-11-02 09:13:18 -06:00
Author
Owner

@techknowlogick commented on GitHub (Apr 11, 2023):

GITEA_ACTIONS: true?

@techknowlogick commented on GitHub (Apr 11, 2023): `GITEA_ACTIONS: true`?
Author
Owner

@delvh commented on GitHub (Apr 11, 2023):

GITEA_ACTION_RUNNER_VERSION: <non-empty version string for Gitea action runners>?
That would allow for the highest possible distinction.

@delvh commented on GitHub (Apr 11, 2023): `GITEA_ACTION_RUNNER_VERSION: <non-empty version string for Gitea action runners>`? That would allow for the highest possible distinction.
Author
Owner

@wolfogre commented on GitHub (Apr 12, 2023):

Since Gitea cannot pass environments to runners (not counting secrets or environments defined in the workflow file), I think it should be an issue of the act runner.

@wolfogre commented on GitHub (Apr 12, 2023): Since Gitea cannot pass environments to runners (not counting secrets or environments defined in the workflow file), I think it should be an issue of the act runner.
Author
Owner

@wolfogre commented on GitHub (Apr 12, 2023):

GITEA_ACTIONS: true
GITEA_ACTIONS_RUNNER_VERSION: <version>

Why not both?

https://gitea.com/gitea/act_runner/pulls/113

@wolfogre commented on GitHub (Apr 12, 2023): > `GITEA_ACTIONS: true` > `GITEA_ACTIONS_RUNNER_VERSION: <version>` Why not both? https://gitea.com/gitea/act_runner/pulls/113
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#10627