mirror of
https://codeberg.org/forgejo/forgejo
synced 2025-09-17 01:32:52 +02:00
This PR contains the following updates: | Package | Change | Age | Confidence | |---|---|---|---| | code.forgejo.org/forgejo/runner/v9 | `v9.1.1` -> `v11.0.0` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - Between 12:00 AM and 03:59 AM ( * 0-3 * * * ) (UTC), Automerge - Between 12:00 AM and 03:59 AM ( * 0-3 * * * ) (UTC). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0MS43Ni4wIiwidXBkYXRlZEluVmVyIjoiNDEuNzYuMCIsInRhcmdldEJyYW5jaCI6ImZvcmdlam8iLCJsYWJlbHMiOlsiZGVwZW5kZW5jeS11cGdyYWRlIiwidGVzdC9ub3QtbmVlZGVkIl19--> Co-authored-by: Earl Warren <contact@earl-warren.org> Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/9218 Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org> Reviewed-by: Michael Kriese <michael.kriese@gmx.de> Co-authored-by: Renovate Bot <forgejo-renovate-action@forgejo.org> Co-committed-by: Renovate Bot <forgejo-renovate-action@forgejo.org>
31 lines
998 B
Go
31 lines
998 B
Go
// Copyright 2025 The Forgejo Authors. All rights reserved.
|
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
package actions
|
|
|
|
import (
|
|
"fmt"
|
|
|
|
"code.forgejo.org/forgejo/runner/v11/act/jobparser"
|
|
)
|
|
|
|
func jobParser(workflow []byte, options ...jobparser.ParseOption) ([]*jobparser.SingleWorkflow, error) {
|
|
singleWorkflows, err := jobparser.Parse(workflow, false, options...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
nameToSingleWorkflows := make(map[string][]*jobparser.SingleWorkflow, len(singleWorkflows))
|
|
duplicates := make(map[string]int, len(singleWorkflows))
|
|
for _, singleWorkflow := range singleWorkflows {
|
|
id, job := singleWorkflow.Job()
|
|
nameToSingleWorkflows[job.Name] = append(nameToSingleWorkflows[job.Name], singleWorkflow)
|
|
if len(nameToSingleWorkflows[job.Name]) > 1 {
|
|
duplicates[job.Name]++
|
|
job.Name = fmt.Sprintf("%s-%d", job.Name, duplicates[job.Name])
|
|
if err := singleWorkflow.SetJob(id, job); err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
}
|
|
return singleWorkflows, nil
|
|
}
|