diff options
author | xtex <xtexchooser@duck.com> | 2024-12-08 02:42:15 +0100 |
---|---|---|
committer | xtex <xtexchooser@duck.com> | 2024-12-08 02:42:18 +0100 |
commit | 6e891ab1be5ddc445836f98bee4f99e35c585080 (patch) | |
tree | 0d5f54a4efe8a0e1129b40a42fdd3032c9c5f377 /models | |
parent | Merge pull request 'fix: don't specify FOR clause for index hint' (#6188) fro... (diff) | |
download | forgejo-6e891ab1be5ddc445836f98bee4f99e35c585080.tar.xz forgejo-6e891ab1be5ddc445836f98bee4f99e35c585080.zip |
feat(secret): generate FORGEJO_TOKEN for all tasks
Improves the Forgejo branding.
Signed-off-by: xtex <xtexchooser@duck.com>
Diffstat (limited to 'models')
-rw-r--r-- | models/secret/secret.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/models/secret/secret.go b/models/secret/secret.go index ce0ad65a79..2666199547 100644 --- a/models/secret/secret.go +++ b/models/secret/secret.go @@ -135,9 +135,10 @@ func GetSecretsOfTask(ctx context.Context, task *actions_model.ActionTask) (map[ secrets["GITHUB_TOKEN"] = task.Token secrets["GITEA_TOKEN"] = task.Token + secrets["FORGEJO_TOKEN"] = task.Token if task.Job.Run.IsForkPullRequest && task.Job.Run.TriggerEvent != actions_module.GithubEventPullRequestTarget { - // ignore secrets for fork pull request, except GITHUB_TOKEN and GITEA_TOKEN which are automatically generated. + // ignore secrets for fork pull request, except GITHUB_TOKEN, GITEA_TOKEN and FORGEJO_TOKEN which are automatically generated. // for the tasks triggered by pull_request_target event, they could access the secrets because they will run in the context of the base branch // see the documentation: https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request_target return secrets, nil |