enhance(actions): improve reusable workflow uses handling and cancellation (#37991)

Follow up #37478

## Changes

1. #37478 doesn't support absolute URL in `uses`. This PR provides
partial support for URL-style reusable workflow references. A reusable
workflow can now be referenced by an absolute URL, as long as it points
to the local Gitea instance:

```yaml
jobs:
  call:
    uses: https://your-gitea.example.com/OWNER/REPO/.gitea/workflows/ci.yaml@v1
```

2. Show an error message in the UI for invalid `uses`.

<img width="1600" alt="image"
src="https://github.com/user-attachments/assets/21b34e61-bf10-4af1-b9fd-4ee4e9fde049"
/>

3. Fix reusable caller cancellation issue. A reusable caller's status is
aggregated from its children, so cancellation should processes a
caller's descendants deepest-first.

---------

Signed-off-by: Zettat123 <zettat123@gmail.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: bircni <bircni@icloud.com>
Co-authored-by: Giteabot <teabot@gitea.io>
This commit is contained in:
Zettat123
2026-06-08 00:39:06 -06:00
committed by GitHub
parent 1e9ea9c8f5
commit 60f66a9bfd
6 changed files with 179 additions and 24 deletions
+1
View File
@@ -3774,6 +3774,7 @@
"actions.runs.no_matching_online_runner_helper": "No matching online runner with label: %s",
"actions.runs.no_job_without_needs": "The workflow must contain at least one job without dependencies.",
"actions.runs.no_job": "The workflow must contain at least one job",
"actions.runs.invalid_reusable_workflow_uses": "Invalid reusable workflow \"uses\": %s",
"actions.runs.actor": "Actor",
"actions.runs.status": "Status",
"actions.runs.actors_no_select": "All actors",