#16 Add ping check, don't echo pubkey, run whoami in last step
Some checks failed
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 13s
Some checks failed
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 13s
This commit is contained in:
parent
326fa400c4
commit
b2bf19cf1d
@ -14,19 +14,20 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Checkout Jafner.net repo
|
- name: Checkout Jafner.net repo
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
- name: Configure SSH agent
|
- name: Check network connectivity to host
|
||||||
|
run: ping -c 1 -t 1 -q 192.168.1.1
|
||||||
|
- name: Configure SSH
|
||||||
run: |
|
run: |
|
||||||
echo -e "${{ secrets.RUNNER_SSH_PRIVATEKEY }}" > /tmp/key
|
echo -e "${{ secrets.RUNNER_SSH_PRIVATEKEY }}" > /tmp/key
|
||||||
chmod 0600 /tmp/key
|
chmod 0600 /tmp/key
|
||||||
ssh-keygen -y -f /tmp/key > /tmp/key.pub
|
ssh-keygen -y -f /tmp/key > /tmp/key.pub
|
||||||
ssh-keygen -l -E sha256 -f /tmp/key.pub
|
ssh-keygen -l -E sha256 -f /tmp/key.pub
|
||||||
cat /tmp/key.pub
|
|
||||||
mkdir -p ~/.ssh/ && touch ~/.ssh/known_hosts
|
mkdir -p ~/.ssh/ && touch ~/.ssh/known_hosts
|
||||||
ssh-keyscan 192.168.1.1 > ~/.ssh/known_hosts
|
ssh-keyscan 192.168.1.1 > ~/.ssh/known_hosts
|
||||||
chmod 0600 ~/.ssh/known_hosts
|
chmod 0600 ~/.ssh/known_hosts
|
||||||
ssh vyos@192.168.1.1 'echo $(date)'
|
|
||||||
- name: Print running VyOS version
|
- name: Print running VyOS version
|
||||||
run: |
|
run: |
|
||||||
|
whoami
|
||||||
./vyos.sh op show system image
|
./vyos.sh op show system image
|
||||||
|
|
||||||
# - name: SSH into host
|
# - name: SSH into host
|
||||||
|
Loading…
Reference in New Issue
Block a user