Jafner.net/.gitea/workflows/vyos-deploy.yaml
Joey Hafner b66e468aea
All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 13s
#16 Add hostkey fingerprint to known_hosts
2024-10-24 16:46:11 -07:00

38 lines
1017 B
YAML

name: SSH and echo to file
on:
push:
branches: [ main ]
paths: [ 'homelab/vyos/config.boot' ]
jobs:
ssh:
defaults:
run:
working-directory: homelab/vyos
runs-on: ubuntu-latest
steps:
- name: Checkout Jafner.net repo
uses: actions/checkout@v4
- name: Configure SSH agent
run: |
echo -e "${{ secrets.RUNNER_SSH_PRIVATEKEY }}" > /tmp/key
chmod 0600 /tmp/key
ssh-keygen -y -f /tmp/key > /tmp/key.pub
ssh-keygen -l -E sha256 -f /tmp/key.pub
ssh-keygen -R 192.168.1.1
alias ssh='ssh -i /tmp/key'
- name: Print running VyOS version
run: |
./vyos.sh op show system image
# - name: SSH into host
# uses: appleboy/ssh-action@v1.1.0
# with:
# host: 192.168.1.1
# username: vyos
# key: ${{ secrets.RUNNER_SSH_PRIVATEKEY }}
# debug: true
# script: |
# echo "$(date)" >> ~/hello.txt