We will be installing an Arch Linux system with full disk encryption, hibernation, a splash boot screen and snapshots.
First, we note the available block devices:
$ fdisk -l
| #!/bin/bash | |
| # Try to get IPv4 address and mask from tun0 | |
| tun_info=$(ip -4 addr show tun0 2>/dev/null | grep -oP 'inet \K[\d.]+/\d+') | |
| # Try to get IPv4 address and mask from eth0 if tun0 fails | |
| eth_info=$(ip -4 addr show eth0 2>/dev/null | grep -oP 'inet \K[\d.]+/\d+') | |
| # Decide which to display | |
| if [[ -n "$tun_info" ]]; then |
| ### IMPORTANT ### | |
| # Make sure `github` user has sudo permissions: `github ALL=(ALL) NOPASSWD: /bin/bash /home/github/redeploy.sh*`. | |
| ### IMPORTANT ### | |
| name: deploy | |
| on: | |
| push: | |
| branches: main | |
| jobs: | |
| push: |