Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
lunny opened this issue Apr 11, 2023 · 4 comments
Labels
issue/confirmed Issue has been reviewed and confirmed to be present or accepted to be implemented type/feature Completely new functionality. Can only be merged if feature freeze is not active. type/proposal The new feature has not been accepted yet but needs to be discussed first.

Comments

@lunny
Copy link
Member

lunny commented 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

@lunny lunny added type/proposal The new feature has not been accepted yet but needs to be discussed first. type/feature Completely new functionality. Can only be merged if feature freeze is not active. labels Apr 11, 2023
@techknowlogick
Copy link
Member

GITEA_ACTIONS: true?

@yardenshoham yardenshoham added the issue/confirmed Issue has been reviewed and confirmed to be present or accepted to be implemented label Apr 11, 2023
@delvh
Copy link
Member

delvh commented Apr 11, 2023

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

@wolfogre
Copy link
Member

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
Copy link
Member

GITEA_ACTIONS: true
GITEA_ACTIONS_RUNNER_VERSION: <version>

Why not both?

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

@lunny lunny closed this as completed Apr 12, 2023
coding2233 pushed a commit to coding2233/act_runner that referenced this issue Apr 26, 2023
Close go-gitea/gitea#24038

Reviewed-on: https://gitea.com/gitea/act_runner/pulls/113
Reviewed-by: techknowlogick <techknowlogick@noreply.gitea.io>
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: Jason Song <i@wolfogre.com>
Co-committed-by: Jason Song <i@wolfogre.com>
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 28, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
issue/confirmed Issue has been reviewed and confirmed to be present or accepted to be implemented type/feature Completely new functionality. Can only be merged if feature freeze is not active. type/proposal The new feature has not been accepted yet but needs to be discussed first.
Projects
None yet
Development

No branches or pull requests

5 participants