diff options
author | badhezi <zlilaharon@gmail.com> | 2025-05-20 05:24:10 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-05-20 02:24:10 +0000 |
commit | 0534eddd16a604fabfec464e36458e540244382d (patch) | |
tree | c5303aac76ce1925afdd976b262992d3953aceb3 /modules/git/repo_commit.go | |
parent | d06eb8d8014b1f179187926b97b92b6f42c65038 (diff) | |
download | gitea-0534eddd16a604fabfec464e36458e540244382d.tar.gz gitea-0534eddd16a604fabfec464e36458e540244382d.zip |
Use run-name and evaluate workflow variables (#34301)
This addresses https://github.com/go-gitea/gitea/issues/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
https://github.com/go-gitea/gitea/blob/3a1320c70df82ae88e286612c1646cffb8e2c343/models/actions/utils.go#L86
and
https://github.com/go-gitea/gitea/blob/3a1320c70df82ae88e286612c1646cffb8e2c343/services/actions/context.go#L169
to pass the correct types to
[GenerateGiteaContext](https://github.com/go-gitea/gitea/pull/34301/files#diff-9c9c27cb61a33e55ad33dc2c2e6a3521957a3e5cc50ddf652fdcd1def87b044dR86)
and
[WithGitContext](https://gitea.com/gitea/act/src/commit/65c232c4a5a40e59e257ab5d956b32585f0405d7/pkg/jobparser/jobparser.go#L84)
respectively.
<img width="1336" alt="Screenshot 2025-04-28 at 17 13 01"
src="https://github.com/user-attachments/assets/73cb03d0-23a0-4858-a466-bbf0748cea98"
/>
Diffstat (limited to 'modules/git/repo_commit.go')
0 files changed, 0 insertions, 0 deletions