go-gitea / gitea

Git with a cup of tea! Painless self-hosted all-in-one software development service, including Git hosting, code review, team collaboration, package registry and CI/CD
https://gitea.com
MIT License
45.13k stars 5.49k forks source link

workflow_run for action trigger event #24898

Open wizpresso-steve-cy-fan opened 1 year ago

wizpresso-steve-cy-fan commented 1 year ago

Feature Description

This event occurs when a workflow run is requested or completed. It allows you to execute a workflow based on execution or completion of another workflow. The workflow started by the workflow_run event is able to access secrets and write tokens, even if the previous workflow was not. This is useful in cases where the previous workflow is intentionally not privileged, but you need to take a privileged action in a later workflow.

In this example, a workflow is configured to run after the separate "Run Tests" workflow completes.

on:
  workflow_run:
    workflows: [Run Tests]
    types:
      - completed

See: https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#workflow_run

Screenshots

No response

hakito commented 11 months ago

Could this be documented on the website? It only lists workflow_dispatch as unsupported.

I would have added instead of asking. But I could not find where to contribute to the website. I only found a link from the archived version on github to https://gitea.com/gitea/website - but this is also archived

ldt116 commented 1 month ago

Could this be documented on the website? It only lists workflow_dispatch as unsupported.

I would have added instead of asking. But I could not find where to contribute to the website. I only found a link from the archived version on github to https://gitea.com/gitea/website - but this is also archived

I think the new repo is https://gitea.com/gitea/docs

Maybe this https://gitea.com/gitea/docs/src/branch/main/docs/usage/actions/comparison.md