Skip to content

Custom/Synthetic action event logs API #33709

Open
@AdamMajer

Description

@AdamMajer

Feature Description

This is a combination of what is already proposed.

Additional API for action runners:
#31416

Global actions:
#32374

I believe the main motivation for the global actions is ability of defining some organizational business logic while retaining the integrations that actions give us. For example, a build result can be stored in an action result and does not require external service.

It would be sufficient to have ability to define "external" actions that are run externally to a repository via current webhook mechanic but can integrate with the Action API. More specifically, have some way of storing external "action" runs and making it visible to users.

  • API to create external action events to an Issue/PR and maybe also Commit/Tag/Release
    API to edit content of this data (eg. update logs, update status)
    API to fetch content of action log (as per Additional API functions for action runners #31416)

These events would be listed as normal action text logs in the UI. No need here to handle runners, etc, just ability to store custom logs and make them available to reviewers.

Why not have these as comments? Let's say there's 100kB of build logs -- these are not easy to consume as comments 😉

Screenshots

No response

Activity

added
type/proposalThe new feature has not been accepted yet but needs to be discussed first.
on Feb 24, 2025
AdamMajer

AdamMajer commented on Feb 24, 2025

@AdamMajer
ContributorAuthor

For example, let's say we have repo org/repo

  • Pull Request Creation event is detected (webhook/polling) -- org/repo#1
  • Some external jobs is started and is appended as action to org/repo#1 as org/repo/action/run/12344 -- synthetic action run.
  • The action log is updated externally as API calls

Which actions are appended to what item is then out-of-scope for gitea. Gitea is then just as store of information to the externally managed business logic.

ChristopherHX

ChristopherHX commented on Feb 25, 2025

@ChristopherHX
Contributor

Including the ability to disable the Gitea Actions Trigger and keep using the UI, workflow_dispatch just needs to sent a webhook then external tools can handle it and report back

This matches with the original Gitea Actions Issue (#13539, before the original post has been updated) and would allow me to choose my own actions runtime runner.server instead of Gitea Actions to manage jobs 👍

I would amend the following to be more like

API to create external action run events to an Issue/PR and maybe also Commit/Tag/Release`

API to create external/synthetic action run entries with jobs, steps and logs

webhook is enough as a trigger, so I would not call it create run events. Or did I miss something?

For just uploading jobs on an action event, you could just implement the following protocol, add a custom label, add all steps for the UI in the dummy yaml file and done

A standard protocol to get tasks and get logs back https://gitea.com/gitea/actions-proto-def

AdamMajer

AdamMajer commented on Feb 26, 2025

@AdamMajer
ContributorAuthor

Mostly "create run events" should be read as "create run event logs". The importance here is ability to create synthetic, externally created "action run event entries/logs" and to query them externally.

I'm not interested in scheduling or running any real actions/workflows by Gitea here. That is already covered elsewhere.

changed the title [-]Custom action logs integration API[/-] [+]Custom/Synthetic action event logs API[/+] on Feb 26, 2025
added a commit that references this issue on Mar 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    topic/gitea-actionsrelated to the actions of Giteatype/proposalThe new feature has not been accepted yet but needs to be discussed first.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @AdamMajer@ChristopherHX@kemzeb

        Issue actions

          Custom/Synthetic action event logs API · Issue #33709 · go-gitea/gitea