-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Support configuration variables
on Gitea Actions
#24404
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
Conversation
configuration varibales
on Gitea Actionsconfiguration variables
on Gitea Actions
configuration variables
on Gitea Actionsconfiguration variables
on Gitea Actions
routers/api/actions/runner/utils.go
Outdated
log.Error("find variables of repo: %d, error: %v", task.Job.Run.RepoID, err) | ||
} | ||
|
||
// TODO: Env level |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will this be fixed in this PR? What did it mean?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Environment is a separate module. It contains the feature of not only environment level variables
but also protection rules
and environment level secrets
.
So i think the feature of Environment
should be completed by a new PR.
bcaba8b
to
3db3d5d
Compare
Sorry for my mistake leads to commits cannot sync to this PR. |
Co-Author: @silverwind @wxiaoguang Replace: #24404 See: - [defining configuration variables for multiple workflows](https://docs.github.com/en/actions/learn-github-actions/variables#defining-configuration-variables-for-multiple-workflows) - [vars context](https://docs.github.com/en/actions/learn-github-actions/contexts#vars-context) Related to: - [x] protocol: https://gitea.com/gitea/actions-proto-def/pulls/7 - [x] act_runner: https://gitea.com/gitea/act_runner/pulls/157 - [x] act: https://gitea.com/gitea/act/pulls/43 #### Screenshoot Create Variable:   Workflow: ```yaml test_vars: runs-on: ubuntu-latest steps: - name: Print Custom Variables run: echo "${{ vars.test_key }}" - name: Try to print a non-exist var run: echo "${{ vars.NON_EXIST_VAR }}" ``` Actions Log:  --- This PR just implement the org / user (depends on the owner of the current repository) and repo level variables, The Environment level variables have not been implemented. Because [Environment](https://docs.github.com/en/actions/deployment/targeting-different-environments/using-environments-for-deployment#about-environments) is a module separate from `Actions`. Maybe it would be better to create a new PR to do it. --------- Co-authored-by: silverwind <[email protected]> Co-authored-by: wxiaoguang <[email protected]> Co-authored-by: Giteabot <[email protected]>
See:
Related to:
Screenshoot
Create Variable:

Workflow:
Actions Log:

This PR just implement the org and repo level variables, The Environment level variables have not been implemented.
Because
Environment
is a module separate fromActions
. Maybe it would be better to create a new PR to do it.