forgejo/services/actions/TestServiceActions_startTask/action_schedule.yml
Earl Warren cd35473212 [v12.0/forgejo] a corrupted Forgejo Actions scheduled workflow is disabled (#8944)
**Backport: https://codeberg.org/forgejo/forgejo/pulls/8942**

The following errors are specific to the scheduled workflow being
handled. They do not imply the remaining scheduled workflows cannot
be scheduled successfully.

- Failure to create a scheduled task which is most likely caused
  by an invalid YAML file.
- Failure to parse the scheduling specs which can be caused by a
  number of formating errors.

Instead of returning on error, the corrupted workflow is disabled.

Also display more informative error messages so that the failed
workflow can be identified from the logged error.

(cherry picked from commit ab3cf7ddcf)

```
Conflicts:
	services/actions/schedule_tasks.go
  trivial context conflict
```

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/8944
Reviewed-by: Otto <otto@codeberg.org>
Co-authored-by: Earl Warren <contact@earl-warren.org>
Co-committed-by: Earl Warren <contact@earl-warren.org>
2025-08-19 01:43:43 +02:00

41 lines
788 B
YAML

# A corrupted cron spec with a valid schedule workflow
-
id: 1
title: schedule_title1
specs:
- '* * * * *'
repo_id: 4
owner_id: 2
workflow_id: 'workflow1.yml'
trigger_user_id: 2
ref: main
commit_sha: shashasha
event: "schedule"
event_payload: "fakepayload"
content: |
jobs:
job2:
runs-on: ubuntu-latest
steps:
- run: true
# A valid cron spec with a corrupted schedule workflow
-
id: 2
title: schedule_title2
specs:
- '* * * * *'
repo_id: 4
owner_id: 2
workflow_id: 'workflow2.yml'
trigger_user_id: 2
ref: main
commit_sha: shashasha
event: "schedule"
event_payload: "fakepayload"
content: |
jobs:
job2: { invalid yaml
runs-on: ubuntu-latest
steps:
- run: true