-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Use run-name and evaluate workflow variables #34301
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
base: main
Are you sure you want to change the base?
Conversation
Shouldn't this go to jobparser? |
@TheFox0x7 |
cca335d
to
9408c76
Compare
Hey @lunny you think I can get someone to review https://gitea.com/gitea/act/pulls/137 so we can push this forward? |
That PR merged. |
Thanks @lunny |
|
…order DispatchActionWorkflow to support run-name parsing
9633e1d
to
7a52cac
Compare
To support go-gitea/gitea#34301 Reviewed-on: https://gitea.com/gitea/act/pulls/137 Reviewed-by: Lunny Xiao <[email protected]> Co-authored-by: badhezi <[email protected]> Co-committed-by: badhezi <[email protected]>
This addresses #34247
depends on https://gitea.com/gitea/act/pulls/137
I couldn't find any previous implementation for
run-name
support on workflows so I created one.Key points:
All dispatched workflows, scheduled workflows and detected workflows (from different hooks) will use and evaluate
run-name
if exists, with the corresponding gitea context and variables. This will be used as the Action run title and replace the default commit message being used today.Had to change act package jobparser (see link above)
and create two helpers
gitea/models/actions/utils.go
Line 86 in 3a1320c
and
gitea/services/actions/context.go
Line 169 in 3a1320c
to pass the correct types to GenerateGiteaContext and WithGitContext respectively.