0
0
Fork 0
mirror of https://github.com/go-gitea/gitea synced 2024-11-24 20:02:48 +01:00
gitea/services/actions
Rowan Bohde 0b5da27570
allow the actions user to login via the jwt token (#32527) (#32580)
Backport #32527

We have some actions that leverage the Gitea API that began receiving
401 errors, with a message that the user was not found. These actions
use the `ACTIONS_RUNTIME_TOKEN` env var in the actions job to
authenticate with the Gitea API. The format of this env var in actions
jobs changed with go-gitea/gitea/pull/28885 to be a JWT (with a
corresponding update to `act_runner`) Since it was a JWT, the OAuth
parsing logic attempted to parse it as an OAuth token, and would return
user not found, instead of falling back to look up the running task and
assigning it to the actions user.

Make ACTIONS_RUNTIME_TOKEN in action runners could be used, attempting
to parse Oauth JWTs. The code to parse potential old
`ACTION_RUNTIME_TOKEN` was kept in case someone is running an older
version of act_runner that doesn't support the Actions JWT.
2024-11-21 03:18:00 +00:00
..
auth.go allow the actions user to login via the jwt token (#32527) (#32580) 2024-11-21 03:18:00 +00:00
auth_test.go Add interface{} to any replacement to make fmt, exclude *.pb.go (#30461) 2024-04-13 17:32:15 +00:00
cleanup.go Expire artifacts before deleting them physically (#29241) 2024-02-18 22:25:14 +08:00
clear_tasks.go Use db.Find instead of writing methods for every object (#28084) 2023-11-24 03:49:41 +00:00
commit_status.go Add commit status summary table to reduce query from commit status table (#30223) 2024-04-12 09:41:50 +08:00
init.go Move notification interface to services layer (#26915) 2023-09-05 18:37:47 +00:00
interface.go feat(api): enhance Actions Secrets Management API for repository (#30656) 2024-04-26 21:11:49 +08:00
job_emitter.go The job should always run when if is always() (#29464) 2024-02-28 11:54:44 +01:00
job_emitter_test.go The job should always run when if is always() (#29464) 2024-02-28 11:54:44 +01:00
notifier.go Fix actions notify bug (#31866) (#31875) 2024-08-20 02:14:29 +08:00
notifier_helper.go Update scheduled tasks even if changes are pushed by "ActionsUser" (#32246) (#32252) 2024-10-14 16:55:16 +08:00
rerun.go Fix bugs in rerunning jobs (#29955) 2024-03-22 03:19:17 +00:00
rerun_test.go Fix bugs in rerunning jobs (#29955) 2024-03-22 03:19:17 +00:00
schedule_tasks.go Interpolate runs-on with variables when scheduling tasks (#30640) 2024-04-23 20:55:25 +02:00
variables.go Add API for Variables (#29520) 2024-03-28 20:40:35 +00:00