Files
actions/power-on/action.yml
2023-12-09 20:16:51 +01:00

32 lines
827 B
YAML

name: "Power system for hardware testing"
author: "Igor Pecovnik"
description: "DUT system power on"
inputs:
KEY_POWER_ON:
required: true
KNOWN_HOSTS_REPOSITORY:
required: true
USER_REPOSITORY:
required: true
HOST_REPOSITORY:
required: true
runs:
using: "composite"
steps:
- name: Install SSH key for repository
uses: shimataro/ssh-key-action@v2
with:
key: ${{ inputs.KEY_POWER_ON }}
name: poweron
known_hosts: ${{ inputs.KNOWN_HOSTS_REPOSITORY }}
if_key_exists: replace
- name: Update repository
if: ${{ github.repository_owner == 'Armbian' }}
shell: bash
run: |
ssh -T -i ~/.ssh/poweron ${{ inputs.USER_REPOSITORY }}@${{ inputs.HOST_REPOSITORY }}
sleep 4m # Sleep for 3m to make sure switches were booted up