name: Drist on: workflow_call: inputs: ci_image: required: true type: string description: image to use inside the workflow jobs default: git.romalex.cc/public/ci-image:v1 hosts_file: required: true type: string description: file containing hosts for drist default: hosts ssh_options: required: true type: string description: options to pass to ssh client default: -o StrictHostKeyChecking=no secrets: ssh_private_key: required: true description: SSH private key to access the hosts jobs: drist: name: Run drist runs-on: romalex-public container: image: ${{ inputs.ci_image }} steps: - name: Checkout uses: actions/checkout@v4 - name: Prepare SSH client run: | cat > ~/.ssh/private_key << EOF ${{ secrets.ssh_private_key }} EOF chmod 600 ~/.ssh/private_key if [ -f ssh_config ]; then cp ssh_config ~/.ssh/config chmod 600 ~/.ssh/config fi - name: Run Drist env: SSH_PARAMS: ${{ inputs.ssh_options }} -i /root/.ssh/private_key run: drist -s ${{ inputs.hosts_file }}