Skip to content

Commit a8b5a7b

Browse files
committed
Fix CompatHelper workflow
1 parent 6815858 commit a8b5a7b

File tree

2 files changed

+25
-12
lines changed

2 files changed

+25
-12
lines changed

.github/workflows/CompatHelper.yml

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,16 @@ on:
88
default: "1"
99
required: false
1010
type: string
11-
localregistries:
12-
description: 'Registries besides General to use. Specified by providing the url (https/ssh) to the Github
13-
repositories as a newline (\n) seperated list.'
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+
local-registry-urls:
18+
description: 'URLs of registries besides General to use. Specified by providing the url (https/ssh) to the Github
19+
repositories as a newline (\n) seperated list. Should correspond to the registry names listed in
20+
`local-registry-names`.'
1421
default: ""
1522
required: false
1623
type: string
@@ -48,13 +55,17 @@ jobs:
4855
import CompatHelper
4956
import Pkg
5057
registries = [
51-
Pkg.RegistrySpec(; url = "https://github.com/JuliaRegistries/General.git")
58+
Pkg.RegistrySpec(;
59+
name = "General",
60+
url = "https://github.com/JuliaRegistries/General.git",
61+
)
5262
]
53-
if !isempty("${{ inputs.localregistries }}")
54-
local_repos = split("${{ inputs.localregistries }}", "\n") .|> string
55-
for repo_url in local_repos
56-
isempty(repo_url) && continue
57-
pus!(registries, Pkg.RegistrySpec(; url = repo_url))
63+
if !isempty("${{ inputs.local-registry-names }}") && !isempty("${{ inputs.local-registry-urls }}")
64+
names = split("${{ inputs.local-registry-names }}", "\n") .|> string
65+
urls = split("${{ inputs.local-registry-urls }}", "\n") .|> string
66+
for (name, url) in zip(names, urls)
67+
(isempty(name) || isempty(url)) && continue
68+
push!(registries, Pkg.RegistrySpec(; name, url))
5869
end
5970
end
6071
CompatHelper.main(; registries, bump_version=true)

README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -181,8 +181,9 @@ The CompatHelper workflow is designed to periodically check dependencies for bre
181181
releases, and if so make PRs to bump the compat versions. By default this workflow
182182
checks the Julia [General registry](https://github.com/JuliaRegistries/General)
183183
for breaking releases of dependencies, but you can add other registries
184-
by specifying the registry repository URLs in the `localregistries` option, which should
185-
be a string with URLs of repositories seperated by a newline character (`\n`).
184+
by specifying the registry names in the `local-registry-names` option
185+
and the registry repository URLs in the `local-registy-urls` option.
186+
Both should be strings with registries seperated by a newline character (`\n`).
186187
Here is an example workflow:
187188

188189
```yaml
@@ -201,5 +202,6 @@ jobs:
201202
name: "CompatHelper"
202203
uses: "ITensor/ITensorActions/.github/workflows/CompatHelper.yml@main"
203204
with:
204-
localregistries: "https://github.com/ITensor/ITensorRegistry.git"
205+
local-registry-names: "ITensorRegistry"
206+
local-registry-urls: "https://github.com/ITensor/ITensorRegistry.git"
205207
```

0 commit comments

Comments
 (0)