diff --git a/README.md b/README.md index b96eaa1..59bc2e6 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/action.yml b/action.yml index 17b8ff5..0b59265 100644 --- a/action.yml +++ b/action.yml @@ -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" @@ -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"))' ) @@ -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 }}"