Actualiser action.yaml

This commit is contained in:
2025-04-14 10:37:46 +02:00
parent 7d780754f3
commit 8a260517e8

View File

@@ -19,31 +19,37 @@ inputs:
description: 'Password used for the connection to the image registry'
required: false
default: ${{ secrets.PMO_REGISTRY_PASSWORD }}
debug:
description: 'Run the action in debug mode'
required: false
default: false
type: boolean
runs:
using: 'composite'
steps:
- name: Set debug mode
if: ${{ inputs.debug == true }}
shell: bash
run: |
source "${{ github.action_path }}/bashlib.sh"
export DEBUG="ON"
echo "DEBUG=ON" >> $GITEA_ENV
debug Debug switch on
- name: Podman connection to the registry
shell: bash
run: |
GREEN='\033[0;32m'
RED='\033[0;31m'
NC='\033[0m' # No Color
if [[ -z $(which ${{ inputs.registry_command }}) ]] ; then
echo -e "${RED}❌ Error:${NC}: Cannot locate the ${{ inputs.registry_command }} command"
exit 1
fi
echo -e "${YELLOW}🔄 ${{ inputs.registry_command }} connection to registry:${NC} ${{ inputs.registry_server }}..."
result=$(${{ inputs.registry_command }} login ${{ inputs.registry_server }} \
-u ${{ inputs.registry_user }} \
-p ${{ inputs.registry_password }}) \
&& echo -e "${GREEN}✅ $result${NC}" \
|| echo -e "${RED}❌ Error: ${NC} $result"
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}"