Skip to content

Commit

Permalink
Allow for empty credentials when not required
Browse files Browse the repository at this point in the history
  • Loading branch information
wawanbreton committed Sep 13, 2024
1 parent ec94c26 commit 1514db9
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions .github/actions/setup-build-environment/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 1514db9

Please sign in to comment.