gitea/models
badhezi 0534eddd16
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
3a1320c70d/models/actions/utils.go (L86)
and
3a1320c70d/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](65c232c4a5/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"
/>
2025-05-20 02:24:10 +00:00
..
actions Use run-name and evaluate workflow variables (#34301) 2025-05-20 02:24:10 +00:00
activities Fix remove org user failure on mssql (#34449) 2025-05-14 02:33:56 +08:00
admin Fix omitempty bug (#33663) 2025-02-20 12:39:21 -08:00
asymkey Cache GPG keys, emails and users when list commits (#34086) 2025-04-09 16:34:38 +00:00
auth Enforce two-factor auth (2FA: TOTP or WebAuthn) (#34187) 2025-04-28 15:31:59 -07:00
avatars Replace 10 more gt- classes with tw- (#29945) 2024-03-22 13:45:10 +00:00
db Enable addtional linters (#34085) 2025-04-01 10:14:01 +00:00
dbfs Enable testifylint rules (#34075) 2025-03-31 01:53:48 -04:00
fixtures Add endpoint deleting workflow run (#34337) 2025-05-13 19:18:13 +00:00
git Rework create/fork/adopt/generate repository to make sure resources will be cleanup once failed (#31035) 2025-04-07 22:12:54 -07:00
issues Option to delay conflict checking of old pull requests until page view (#27779) 2025-04-24 19:26:57 +00:00
migrations Add migrations tests (#34456) 2025-05-15 16:28:31 +00:00
organization Fix remove org user failure on mssql (#34449) 2025-05-14 02:33:56 +08:00
packages Swift files can be passed either as file or as form value (#34068) 2025-04-18 20:09:56 +08:00
perm Enforce two-factor auth (2FA: TOTP or WebAuthn) (#34187) 2025-04-28 15:31:59 -07:00
project Enable addtional linters (#34085) 2025-04-01 10:14:01 +00:00
pull Automerge supports deleting branch automatically after merging (#32343) 2025-01-10 03:51:03 +08:00
renderhelper Refactor commit message rendering and fix bugs (#34412) 2025-05-09 20:42:35 +08:00
repo Fix remove org user failure on mssql (#34449) 2025-05-14 02:33:56 +08:00
secret Added Description Field for Secrets and Variables (#33526) 2025-03-17 19:24:54 +00:00
shared/types Refactor locale&string&template related code (#29165) 2024-02-14 21:48:45 +00:00
system Enable testifylint rules (#34075) 2025-03-31 01:53:48 -04:00
unit Fix team permission (#34128) 2025-04-08 04:15:15 +00:00
unittest Uniform all temporary directories and allow customizing temp path (#32352) 2025-04-08 16:15:28 +00:00
user Fix GetUsersByEmails (#34423) 2025-05-10 11:47:58 -07:00
webhook fix webhook url (#34186) 2025-04-13 02:24:32 +00:00
main_test.go make writing main test easier (#27270) 2023-09-28 01:38:53 +00:00
repo_test.go Enable testifylint rules (#34075) 2025-03-31 01:53:48 -04:00
repo.go Fix issue comment number (#30556) 2024-12-30 14:35:46 -08:00