diff --git a/internal/app/run/runner.go b/internal/app/run/runner.go index c9f5f3e..7ad9661 100644 --- a/internal/app/run/runner.go +++ b/internal/app/run/runner.go @@ -162,6 +162,12 @@ func (r *Runner) run(ctx context.Context, task *runnerv1.Task, reporter *report. preset.Token = t } + if actionsIdTokenRequestUrl := taskContext["actions_id_token_request_url"].GetStringValue(); actionsIdTokenRequestUrl != "" { + r.envs["ACTIONS_ID_TOKEN_REQUEST_URL"] = actionsIdTokenRequestUrl + r.envs["ACTIONS_ID_TOKEN_REQUEST_TOKEN"] = taskContext["actions_id_token_request_token"].GetStringValue() + task.Secrets["ACTIONS_ID_TOKEN_REQUEST_TOKEN"] = r.envs["ACTIONS_ID_TOKEN_REQUEST_TOKEN"] + } + // use task token to action api token r.envs["ACTIONS_RUNTIME_TOKEN"] = preset.Token