Skip to content

Runner registration token via API is broken for repo level runners #31707

Closed
@floriankessler

Description

@floriankessler

Description

While I can obtain a token through an "undocumented" API call, using it results in broken runner behavior.

  1. Retrieving a token via /repos/{owner}/{repo}/runners/registration-token, as referenced in ${GITEA_URL}/api/swagger, returns a 404 error.

  2. By examining related API calls, I added /actions to the endpoint. This adjustment does return a token for a runner mapped to a repository, but it differs from the token displayed in the repository's Actions settings in the web UI.

Moreover, using this token allows the registration of a runner. However, it will only process the first job assigned after a restart.

Gitea Version

1.22-rootless

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

https://gist.github.com/floriankessler/b7b3a141b11edd34e8867f423ddd3acb

Screenshots

No response

Git Version

No response

Operating System

No response

How are you running Gitea?

see gist

Database

SQLite

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions