Skip to content

Commit 72ddd0f

Browse files
authored
Export the JULIA_PKG_SERVER_REGISTRY_PREFERENCE variable for subsequent steps. (#33)
1 parent 7c59a05 commit 72ddd0f

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,13 @@ jobs:
3333
- uses: julia-actions/julia-buildpkg@v1
3434
- uses: julia-actions/julia-runtest@v1
3535
```
36+
37+
38+
### Registry flavor preference
39+
40+
This actions defines (and exports for subsequent steps of the workflow) the
41+
environmental variable `JULIA_PKG_SERVER_REGISTRY_PREFERENCE=eager` unless it
42+
is already set. If you want another registry flavor (i.e. `conservative`) this
43+
should be defined in the `env:` section of the relevant workflow or step. See
44+
[Registry flavors](https://pkgdocs.julialang.org/dev/registries/#Registry-flavors)
45+
for more information.

action.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,13 @@ inputs:
1717
runs:
1818
using: 'composite'
1919
steps:
20+
- name: Set and export registry flavor preference
21+
run: echo "JULIA_PKG_SERVER_REGISTRY_PREFERENCE=${JULIA_PKG_SERVER_REGISTRY_PREFERENCE:-eager}" >> ${GITHUB_ENV}
22+
shell: bash
2023
- run: |
2124
import Pkg
2225
VERSION >= v"1.5-" && Pkg.Registry.add("General")
2326
VERSION >= v"1.1.0-rc1" ? Pkg.build(verbose=true) : Pkg.build()
2427
shell: julia --color=yes --project=${{ inputs.project }} {0}
2528
env:
26-
JULIA_PKG_SERVER_REGISTRY_PREFERENCE: "${{ env.JULIA_PKG_SERVER_REGISTRY_PREFERENCE == '' && 'eager' || env.JULIA_PKG_SERVER_REGISTRY_PREFERENCE }}"
2729
JULIA_PKG_PRECOMPILE_AUTO: "${{ inputs.precompile }}"

0 commit comments

Comments
 (0)