generated from pmo-actions/healthchecks-ping
Actualiser action.yaml
This commit is contained in:
42
action.yaml
42
action.yaml
@@ -19,31 +19,37 @@ inputs:
|
|||||||
description: 'Password used for the connection to the image registry'
|
description: 'Password used for the connection to the image registry'
|
||||||
required: false
|
required: false
|
||||||
default: ${{ secrets.PMO_REGISTRY_PASSWORD }}
|
default: ${{ secrets.PMO_REGISTRY_PASSWORD }}
|
||||||
|
debug:
|
||||||
|
description: 'Run the action in debug mode'
|
||||||
|
required: false
|
||||||
|
default: false
|
||||||
|
type: boolean
|
||||||
|
|
||||||
runs:
|
runs:
|
||||||
using: 'composite'
|
using: 'composite'
|
||||||
steps:
|
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
|
- name: Podman connection to the registry
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
GREEN='\033[0;32m'
|
source "${{ github.action_path }}/bashlib.sh"
|
||||||
RED='\033[0;31m'
|
|
||||||
NC='\033[0m' # No Color
|
check_command ${{ inputs.registry_command }}
|
||||||
|
|
||||||
|
step "${{ inputs.registry_command }} connection to registry" "${{ inputs.registry_server }}..."
|
||||||
|
|
||||||
if [[ -z $(which ${{ inputs.registry_command }}) ]] ; then
|
result=$(${{ inputs.registry_command }} login ${{ inputs.registry_server }} \
|
||||||
echo -e "${RED}❌ Error:${NC}: Cannot locate the ${{ inputs.registry_command }} command"
|
-u ${{ inputs.registry_user }} \
|
||||||
exit 1
|
-p ${{ inputs.registry_password }}) \
|
||||||
fi
|
&& success "${result}" \
|
||||||
|
|| error "Error" "${result}"
|
||||||
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"
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user