Initial upload

This commit is contained in:
Richard Robert Reitz 2025-10-02 14:07:01 +02:00
parent 8fdcc8f382
commit 2f5fe15521
2 changed files with 53 additions and 0 deletions

View file

@ -0,0 +1,28 @@
name: 'Edge Connect Deploy'
description: 'Deploys an Edge Connect application using the edge-connect-client'
author: 'DevFW'
inputs:
config-file:
description: 'Path to the Edge Connect configuration file.'
required: true
dry-run:
description: 'Perform a dry run of the deployment.'
required: false
default: 'false'
version:
description: 'The version of the edge-connect-client to use.'
required: false
default: 'v0.1.0'
runs:
using: 'composite'
steps:
- name: 'Download and run edge-connect-client'
run: |
${{ github.action_path }}/endpoint.sh
shell: bash
env:
INPUT_CONFIG-FILE: ${{ inputs.config-file }}
INPUT_DRY-RUN: ${{ inputs.dry-run }}
INPUT_VERSION: ${{ inputs.version }}

View file

@ -1,3 +1,28 @@
#!/bin/bash
set -euo pipefail
main() {
local download_url="https://edp.buildth.ing/DevFW-CICD/edge-connect-client/releases/download/${INPUT_VERSION}/edge-connect-client_Linux_x86_64.tar.gz"
echo "Downloading edge-connect-client from ${download_url}"
local temp_dir
temp_dir=$(mktemp -d)
curl -sSL "${download_url}" | tar -xz -C "${temp_dir}"
local cli_path="${temp_dir}/edge-connect-client"
chmod +x "${cli_path}"
local -a args
args=("--file" "${INPUT_CONFIG-FILE}")
if [[ "${INPUT_DRY-RUN}" == "true" ]]; then
args+=("--dry-run")
fi
# The CLI uses an interactive prompt, so we need to pipe "yes" to it.
yes | "${cli_path}" apply "${args[@]}"
}
main