diff --git a/action.yaml b/action.yaml index cf0a338..e098f60 100644 --- a/action.yaml +++ b/action.yaml @@ -28,11 +28,13 @@ inputs: runs: using: 'composite' steps: + - name: Load bash library + uses: https://gargoton.petite-maison-orange.fr/pmo-actions/bash-library@main - name: Set debug mode if: ${{ inputs.debug == true }} shell: bash run: | - source "${{ github.action_path }}/bashlib.sh" + source "${{ github.action_path }}/../bashlib.sh" export DEBUG="ON" echo "DEBUG=ON" >> $GITEA_ENV debug Debug switch on @@ -40,16 +42,19 @@ runs: - name: Podman connection to the registry shell: bash run: | - source "${{ github.action_path }}/bashlib.sh" + source "${{ github.action_path }}/../bashlib.sh" check_command ${{ inputs.registry_command }} step "${{ inputs.registry_command }} connection to registry" "${{ inputs.registry_server }}..." - result=$(${{ inputs.registry_command }} login ${{ inputs.registry_server }} \ - -u ${{ inputs.registry_user }} \ - -p ${{ inputs.registry_password }}) \ - && success "${result}" \ - || error "Error" "${result}" - + + if result=$(${{ inputs.registry_command }} login ${{ inputs.registry_server }} \ + -u ${{ inputs.registry_user }} \ + -p ${{ inputs.registry_password }}) + then + success "${result}" \ + else + error "Error" "${result}" + fi