diff options
-rw-r--r-- | .forgejo/workflows/publish-release.yml | 3 | ||||
-rw-r--r-- | RELEASE-NOTES.md | 4 | ||||
-rw-r--r-- | internal/app/cmd/exec.go | 4 | ||||
-rw-r--r-- | internal/app/run/runner.go | 4 |
4 files changed, 12 insertions, 3 deletions
diff --git a/.forgejo/workflows/publish-release.yml b/.forgejo/workflows/publish-release.yml index eca38a8..031205c 100644 --- a/.forgejo/workflows/publish-release.yml +++ b/.forgejo/workflows/publish-release.yml @@ -28,13 +28,14 @@ jobs: - uses: actions/checkout@v4 - name: copy & sign - uses: https://code.forgejo.org/forgejo/forgejo-build-publish/publish@v5 + uses: https://code.forgejo.org/forgejo/forgejo-build-publish/publish@v5.2.0 with: from-forgejo: ${{ secrets.FORGEJO }} to-forgejo: ${{ secrets.FORGEJO }} from-owner: ${{ secrets.FROM_OWNER }} to-owner: ${{ secrets.TO_OWNER }} repo: "runner" + release-notes: "See https://code.forgejo.org/forgejo/runner/src/branch/main/RELEASE-NOTES.md#{ANCHOR}" ref-name: ${{ github.ref_name }} sha: ${{ github.sha }} container-suffixes: " " diff --git a/RELEASE-NOTES.md b/RELEASE-NOTES.md index 743b78a..e7f7ae4 100644 --- a/RELEASE-NOTES.md +++ b/RELEASE-NOTES.md @@ -1,5 +1,9 @@ # Release Notes +## 5.0.4 + +* Define FORGEJO_TOKEN as an alias to GITHUB_TOKEN + ## 5.0.3 * [Fixes a regression](https://code.forgejo.org/forgejo/runner/pulls/354) that was introduced in version 5.0.0 by which it was no longer possible to mount the docker socket in each container by specifying `[container].docker_host = ""`. This is now implemented when `[container].docker_host = "automount"` is specified. diff --git a/internal/app/cmd/exec.go b/internal/app/cmd/exec.go index 3e111fe..ea1718b 100644 --- a/internal/app/cmd/exec.go +++ b/internal/app/cmd/exec.go @@ -418,7 +418,9 @@ func runExec(ctx context.Context, execArgs *executeArgs) func(cmd *cobra.Command config.Env["ACT_EXEC"] = "true" - if t := config.Secrets["GITEA_TOKEN"]; t != "" { + if t := config.Secrets["FORGEJO_TOKEN"]; t != "" { + config.Token = t + } else if t := config.Secrets["GITEA_TOKEN"]; t != "" { config.Token = t } else if t := config.Secrets["GITHUB_TOKEN"]; t != "" { config.Token = t diff --git a/internal/app/run/runner.go b/internal/app/run/runner.go index c0f59e9..5f03638 100644 --- a/internal/app/run/runner.go +++ b/internal/app/run/runner.go @@ -168,7 +168,9 @@ func (r *Runner) run(ctx context.Context, task *runnerv1.Task, reporter *report. RepositoryOwner: taskContext["repository_owner"].GetStringValue(), RetentionDays: taskContext["retention_days"].GetStringValue(), } - if t := task.Secrets["GITEA_TOKEN"]; t != "" { + if t := task.Secrets["FORGEJO_TOKEN"]; t != "" { + preset.Token = t + } else if t := task.Secrets["GITEA_TOKEN"]; t != "" { preset.Token = t } else if t := task.Secrets["GITHUB_TOKEN"]; t != "" { preset.Token = t |