|
8 | 8 | default: "1"
|
9 | 9 | required: false
|
10 | 10 | type: string
|
11 |
| - local-registry-names: |
12 |
| - description: 'Names of registries besides General to use. Specified by providing the name of the registries |
13 |
| - as a newline (\n) seperated list. Should correspond to the registry URLs listed in `local-registry-urls`.' |
14 |
| - default: "" |
15 |
| - required: false |
16 |
| - type: string |
17 | 11 | local-registry-urls:
|
18 | 12 | description: 'URLs of registries besides General to use. Specified by providing the url (https/ssh) to the Github
|
19 | 13 | repositories as a newline (\n) seperated list. Should correspond to the registry names listed in
|
20 | 14 | `local-registry-names`.'
|
21 | 15 | default: ""
|
22 | 16 | required: false
|
23 | 17 | type: string
|
| 18 | + local-registry-names: |
| 19 | + description: 'Names of registries besides General to use. Specified by providing the name of the registries |
| 20 | + as a newline (\n) seperated list. Should correspond to the registry URLs listed in `local-registry-urls`.' |
| 21 | + default: "" |
| 22 | + required: false |
| 23 | + type: string |
24 | 24 |
|
25 | 25 | jobs:
|
26 | 26 | CompatHelper:
|
@@ -60,12 +60,17 @@ jobs:
|
60 | 60 | url = "https://github.com/JuliaRegistries/General.git",
|
61 | 61 | )
|
62 | 62 | ]
|
63 |
| - if !isempty("${{ inputs.local-registry-names }}") && !isempty("${{ inputs.local-registry-urls }}") |
64 |
| - registry_names = split("${{ inputs.local-registry-names }}", "\n") .|> string |
| 63 | + if !isempty("${{ inputs.local-registry-urls }}") |
65 | 64 | registry_urls = split("${{ inputs.local-registry-urls }}", "\n") .|> string
|
66 |
| - for (registry_name, registry_url) in zip(registry_names, registry_urls) |
67 |
| - (isempty(registry_name) || isempty(registry_url)) && continue |
68 |
| - push!(registries, Pkg.RegistrySpec(; name=registry_name, url=registry_url)) |
| 65 | + registry_names = if !isempty("${{ inputs.local-registry-names }}") |
| 66 | + split("${{ inputs.local-registry-names }}", "\n") .|> string |
| 67 | + else |
| 68 | + # Guess the registry name from the last part of the repository URL. |
| 69 | + map(registry_url -> first(split(last(split(registry_url, '/')), '.')), registry_urls) |
| 70 | + end |
| 71 | + for (registry_url, registry_name) in zip(registry_urls, registry_names) |
| 72 | + isempty(registry_url) && continue |
| 73 | + push!(registries, Pkg.RegistrySpec(; url=registry_url, name=registry_name)) |
69 | 74 | end
|
70 | 75 | end
|
71 | 76 | CompatHelper.main(; registries, bump_version=true)
|
|
0 commit comments