Skip to content

Commit

Permalink
Export the JULIA_PKG_SERVER_REGISTRY_PREFERENCE variable for subseque…
Browse files Browse the repository at this point in the history
…nt steps. (#75)
  • Loading branch information
fredrikekre authored Mar 13, 2023
1 parent ba451bf commit 3378215
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,3 +78,13 @@ If you only want to add this prefix on certain builds, you can [include addition
```

This will add the prefix `xvfb-run` to all builds where the `os` is `ubuntu-latest`.


### Registry flavor preference

This actions defines (and exports for subsequent steps of the workflow) the
environmental variable `JULIA_PKG_SERVER_REGISTRY_PREFERENCE=eager` unless it
is already set. If you want another registry flavor (i.e. `conservative`) this
should be defined in the `env:` section of the relevant workflow or step. See
[Registry flavors](https://pkgdocs.julialang.org/dev/registries/#Registry-flavors)
for more information.
6 changes: 3 additions & 3 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ inputs:
runs:
using: 'composite'
steps:
- name: Set and export registry flavor preference
run: echo "JULIA_PKG_SERVER_REGISTRY_PREFERENCE=${JULIA_PKG_SERVER_REGISTRY_PREFERENCE:-eager}" >> ${GITHUB_ENV}
shell: bash
- name: Install dependencies in their own (shared) environment
run: |
if VERSION > v"1.8pre"
Expand All @@ -45,8 +48,6 @@ runs:
end
shell: julia --color=yes {0}
if: inputs.annotate == 'true'
env:
JULIA_PKG_SERVER_REGISTRY_PREFERENCE: "${{ env.JULIA_PKG_SERVER_REGISTRY_PREFERENCE == '' && 'eager' || env.JULIA_PKG_SERVER_REGISTRY_PREFERENCE }}"
- run: |
# The Julia command that will be executed
julia_cmd=( julia --color=yes --depwarn=${{ inputs.depwarn }} --inline=${{ inputs.inline }} --project=${{ inputs.project }} -e 'include(joinpath(ENV["GITHUB_ACTION_PATH"], "test_harness.jl"))' )
Expand All @@ -64,4 +65,3 @@ runs:
COVERAGE: ${{ inputs.coverage }}
FORCE_LATEST_COMPATIBLE_VERSION: ${{ inputs.force_latest_compatible_version }}
CHECK_BOUNDS: ${{ inputs.check_bounds }}
JULIA_PKG_SERVER_REGISTRY_PREFERENCE: "${{ env.JULIA_PKG_SERVER_REGISTRY_PREFERENCE == '' && 'eager' || env.JULIA_PKG_SERVER_REGISTRY_PREFERENCE }}"

0 comments on commit 3378215

Please sign in to comment.