From 1514db949b6c161cfe638e55ad96a1cc9b94a642 Mon Sep 17 00:00:00 2001 From: Erwan MATHIEU Date: Fri, 13 Sep 2024 16:00:10 +0200 Subject: [PATCH] Allow for empty credentials when not required --- .../actions/setup-build-environment/action.yml | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/.github/actions/setup-build-environment/action.yml b/.github/actions/setup-build-environment/action.yml index 5044b95..09e62a7 100644 --- a/.github/actions/setup-build-environment/action.yml +++ b/.github/actions/setup-build-environment/action.yml @@ -5,10 +5,12 @@ description: 'Clones the required repositories, and properly sets Python and con inputs: conan_user: - required: true + required: false + default: '' type: string conan_password: - required: true + required: false + default: '' type: string private_data: required: false @@ -46,11 +48,16 @@ runs: conan profile detect -f conan config install https://github.com/Ultimaker/conan-config.git -a "-b CURA-11622_conan_v2" - conan remote login cura-conan2 ${{ inputs.conan_user }} -p ${{ inputs.conan_password }} + + if [ "${{ inputs.conan_user }}" != "" ] && [ "${{ inputs.conan_password }}" != "" ]; then + conan remote login cura-conan2 ${{ inputs.conan_user }} -p ${{ inputs.conan_password }} + fi if [ "${{ inputs.private_data }}" == "true" ]; then conan remote enable cura-private-conan2 - conan remote login cura-private-conan2 ${{ inputs.conan_user }} -p ${{ inputs.conan_password }} + if [ "${{ inputs.conan_user }}" != "" ] && [ "${{ inputs.conan_password }}" != "" ]; then + conan remote login cura-private-conan2 ${{ inputs.conan_user }} -p ${{ inputs.conan_password }} + fi fi if [ "${{ inputs.install_system_dependencies }}" == "true" ]; then