Update workflows and backup scripts

This commit is contained in:
albert 2024-04-13 23:33:14 +09:00
parent e0cce6bc0f
commit 8f7d909347
No known key found for this signature in database
GPG key ID: 64F6C4EB46C4543A
3 changed files with 10 additions and 8 deletions

View file

@ -25,17 +25,19 @@ jobs:
id
cat /etc/resolv.conf
- name: "Setup: Tailscale Repo"
run: |
sudo mkdir -p --mode=0755 /usr/share/keyrings
curl -fsSL https://pkgs.tailscale.com/stable/ubuntu/lunar.noarmor.gpg | sudo tee /usr/share/keyrings/tailscale-archive-keyring.gpg >/dev/null
curl -fsSL https://pkgs.tailscale.com/stable/ubuntu/lunar.tailscale-keyring.list | sudo tee /etc/apt/sources.list.d/tailscale.list
- name: "Setup: Runner"
run: |
apt update -y
apt install git nodejs nix-bin sudo tailscale -y
git config --global user.email "${{github.actor}}"
git config --global user.name "Albert J. Copeland"
- name: "Setup: Tailscale Repo"
run: |
sudo mkdir -p --mode=0755 /usr/share/keyrings
curl -fsSL https://pkgs.tailscale.com/stable/ubuntu/lunar.noarmor.gpg | sudo tee /usr/share/keyrings/tailscale-archive-keyring.gpg >/dev/null
curl -fsSL https://pkgs.tailscale.com/stable/ubuntu/lunar.tailscale-keyring.list | sudo tee /etc/apt/sources.list.d/tailscale.list
- name: "Setup: SSH"
run: |
rm -rf /root/.ssh
@ -48,7 +50,7 @@ jobs:
echo "Public Key: "
cat /root/.ssh/id_ed25519.pub
- name: "Setup: Headscale"
- name: "Setup: Headscale Network"
run: |
echo "tailscaled --cleanup"
sudo tailscaled --cleanup

View file

@ -39,7 +39,7 @@ fi
check=$(ssh root@nuc-docker01 df -h | grep 192.168.1.100 | wc -l)
if [[ $check != 1 ]] ; then
echo "Synology is not mounted on nuc-docker01: check returned $check"
payload="{\"message\": \"Backup stopped. Synology isn't mounted\nDate: `date`\", \"priority\": 2,\"title\": \"backups-rpi4: Backup Stopped\"}"
payload="{\"message\": \"Backup stopped. Synology isn't mounted\nDate: `date`\", \"priority\": 2,\"title\": \"japan-rpi4: $BACKUP_NAME Backup Stopped\"}"
curl -X "POST" "https://gotify.sysctl.io/message" -H "accept: application/json" -H "Content-Type: application/json" -H "X-Gotify-Key: $GOTIFY_TOKEN" -d "$payload"
exit
fi

View file

@ -39,7 +39,7 @@ fi
check=$(ssh root@nuc-docker01 df -h | grep 192.168.1.100 | wc -l)
if [[ $check != 1 ]] ; then
echo "Synology is not mounted on nuc-docker01: check returned $check"
payload="{\"message\": \"Backup stopped. Synology isn't mounted\nDate: `date`\", \"priority\": 2,\"title\": \"backups-rpi4: Backup Stopped\"}"
payload="{\"message\": \"Backup stopped. Synology isn't mounted\nDate: `date`\", \"priority\": 2,\"title\": \"japan-rpi4: $BACKUP_NAME Backup Stopped\"}"
curl -X "POST" "https://gotify.sysctl.io/message" -H "accept: application/json" -H "Content-Type: application/json" -H "X-Gotify-Key: $GOTIFY_TOKEN" -d "$payload"
exit
fi