now enforcing ipv6 for runners #48
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy to Raspberry Pi | |
on: | |
push: | |
branches: | |
- nightly | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
environment: dev | |
env: | |
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }} | |
RASPBERRY_PI_IP: ${{ secrets.RPI_IP_DEV }} | |
REPO_URL: ${{ github.server_url }}/${{ github.repository }} | |
RASPBERRY_PI_UNAME: ${{ secrets.RASPBERRY_PI_UNAME }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Setup SSH | |
run: | | |
mkdir -p ~/.ssh | |
echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_rsa | |
chmod 600 ~/.ssh/id_rsa | |
ssh-keyscan -6 -H ${RASPBERRY_PI_IP} >> ~/.ssh/known_hosts | |
- name: Test SSH connection using IPv6 | |
run: ssh -6 -v ${RASPBERRY_PI_UNAME}@${RASPBERRY_PI_IP} exit |