-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Gitea Actions - Support for configuration variables in workflows #30393
Comments
This has been supported. ref https://docs.gitea.com/usage/actions/act-runner?_highlight=variable#configuration-variable |
Thanks!
however, when I set the name as |
I have the name set up in uppercase and set to - name: Run pytest
run: |
if [ -d tests/ ]; then
echo "Test directory exists..."
echo "RUN_TESTS variable is set to {{ vars.RUN_TESTS }}"
if [ "{{ vars.RUN_TESTS }}" = "true" ]; then
echo "RUN_TESTS is set to true, running tests..."
python -m pytest tests/
else
echo "RUN_TESTS is not set to true, skipping tests."
fi
else
echo "Test directory does not exist, skipping tests."
fi however, I get as output:
So it seems the variable does not get read. What am I doing wrong? |
Sorry, the documentaion is wrong. It should be |
This will be fixed by #30394 |
Fix #30393 --------- Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: Zettat123 <zettat123@gmail.com>
Fix go-gitea#30393 --------- Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: Zettat123 <zettat123@gmail.com>
Fix go-gitea#30393 --------- Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: Zettat123 <zettat123@gmail.com>
Feature Description
Hello,
In my Gitea Actions configuration - suppose that I would like to be able to configure the behavior of certain steps.
For example, consider the following step:
Currently I can configure this behavior by a yaml file that I keep in the repository. However, is it possible to have it as an external variable that is configurable per repository, in the Gitea frontend? And it can be accessed in a way like
gitea.actor
. I assume this is similar to what GitHub Actions already supports here.Please let me know if such a thing already exists, or if not what is the best practice for this requirement (should I continue having this external yaml file for my configs?).
Thanks!
Screenshots
No response
The text was updated successfully, but these errors were encountered: