YAMLLint fixes and workflow fixes
This commit is contained in:
parent
06e2412e8a
commit
a2e0142212
6 changed files with 300 additions and 295 deletions
|
@ -1,3 +1,5 @@
|
||||||
|
# yamllint disable rule:line-length rule:truthy
|
||||||
|
---
|
||||||
name: deploy-rs
|
name: deploy-rs
|
||||||
run-name: ${{ github.actor }} - deploy-rs
|
run-name: ${{ github.actor }} - deploy-rs
|
||||||
on:
|
on:
|
||||||
|
@ -14,110 +16,110 @@ jobs:
|
||||||
image: ubuntu:24.04
|
image: ubuntu:24.04
|
||||||
options: --mount type=bind,src=/dev/net/tun,dst=/dev/net/tun --privileged
|
options: --mount type=bind,src=/dev/net/tun,dst=/dev/net/tun --privileged
|
||||||
steps:
|
steps:
|
||||||
- name: "Runner: Info"
|
- name: "Runner: Info"
|
||||||
run: |
|
run: |
|
||||||
set -x
|
set -x
|
||||||
pwd
|
pwd
|
||||||
ls -lah
|
ls -lah
|
||||||
id
|
id
|
||||||
uname -a
|
uname -a
|
||||||
hostname
|
hostname
|
||||||
cat /etc/os-release
|
cat /etc/os-release
|
||||||
whoami
|
whoami
|
||||||
id
|
id
|
||||||
cat /etc/resolv.conf
|
cat /etc/resolv.conf
|
||||||
|
|
||||||
- name: "Setup: Runner"
|
- name: "Setup: Runner"
|
||||||
run:
|
run:
|
||||||
apt update -y
|
apt update -y
|
||||||
apt install git nodejs nix-bin sudo curl -y
|
apt install git nodejs nix-bin sudo curl -y
|
||||||
git config --global user.email "${{github.actor}}"
|
git config --global user.email "${{github.actor}}"
|
||||||
git config --global user.name "Forgejo Runner"
|
git config --global user.name "Forgejo Runner"
|
||||||
echo "100.64.0.13 gotify.sysctl.io" >> /etc/hosts
|
echo "100.64.0.13 gotify.sysctl.io" >> /etc/hosts
|
||||||
|
|
||||||
- name: "Setup: Tailscale Repo"
|
- name: "Setup: Tailscale Repo"
|
||||||
run: |
|
run: |
|
||||||
mkdir -p --mode=0755 /usr/share/keyrings
|
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.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
|
curl -fsSL https://pkgs.tailscale.com/stable/ubuntu/lunar.tailscale-keyring.list | sudo tee /etc/apt/sources.list.d/tailscale.list
|
||||||
apt update -y
|
apt update -y
|
||||||
apt install tailscale -y
|
apt install tailscale -y
|
||||||
|
|
||||||
- name: "Setup: SSH"
|
- name: "Setup: SSH"
|
||||||
run: |
|
run: |
|
||||||
rm -rf /root/.ssh
|
rm -rf /root/.ssh
|
||||||
mkdir /root/.ssh
|
mkdir /root/.ssh
|
||||||
echo "${{ secrets.SSH_PUBLIC_KEY }}" > /root/.ssh/id_ed25519.pub
|
echo "${{ secrets.SSH_PUBLIC_KEY }}" > /root/.ssh/id_ed25519.pub
|
||||||
echo "${{ secrets.SSH_PRIVATE_KEY }}" > /root/.ssh/id_ed25519
|
echo "${{ secrets.SSH_PRIVATE_KEY }}" > /root/.ssh/id_ed25519
|
||||||
chmod 700 /root/.ssh
|
chmod 700 /root/.ssh
|
||||||
chmod 600 /root/.ssh/id_ed25519
|
chmod 600 /root/.ssh/id_ed25519
|
||||||
chmod 644 /root/.ssh/id_ed25519.pub
|
chmod 644 /root/.ssh/id_ed25519.pub
|
||||||
|
|
||||||
- name: "Setup: Headscale Network"
|
- name: "Setup: Headscale Network"
|
||||||
run: |
|
run: |
|
||||||
echo "tailscaled --cleanup"
|
echo "tailscaled --cleanup"
|
||||||
sudo tailscaled --cleanup
|
sudo tailscaled --cleanup
|
||||||
echo ""
|
echo ""
|
||||||
echo "tailscaled --state=mem 2> ~/tailscaled.log &"
|
echo "tailscaled --state=mem 2> ~/tailscaled.log &"
|
||||||
sudo tailscaled --state=mem: 2> ~/tailscaled.log &
|
sudo tailscaled --state=mem: 2> ~/tailscaled.log &
|
||||||
echo ""
|
echo ""
|
||||||
echo "tailscale up"
|
echo "tailscale up"
|
||||||
sudo tailscale up \
|
sudo tailscale up \
|
||||||
--login-server=https://headscale.sysctl.io \
|
--login-server=https://headscale.sysctl.io \
|
||||||
--accept-routes \
|
--accept-routes \
|
||||||
--accept-dns \
|
--accept-dns \
|
||||||
--authkey ${{ secrets.TAILSCALE_KEY }} \
|
--authkey ${{ secrets.TAILSCALE_KEY }} \
|
||||||
--hostname forgejo-runner \
|
--hostname forgejo-runner \
|
||||||
--advertise-tags "tag:forgejo,tag:container,tag:ephemeral"
|
--advertise-tags "tag:forgejo,tag:container,tag:ephemeral"
|
||||||
sudo tailscale status
|
sudo tailscale status
|
||||||
sudo tailscale netcheck
|
sudo tailscale netcheck
|
||||||
|
|
||||||
- name: "nixos-version (Pre)"
|
- name: "nixos-version (Pre)"
|
||||||
run: |
|
run: |
|
||||||
ssh -q -A -o StrictHostKeyChecking=no albert@warsaw-ovh-01 \
|
ssh -q -A -o StrictHostKeyChecking=no albert@warsaw-ovh-01 \
|
||||||
"
|
"
|
||||||
nixos-version
|
nixos-version
|
||||||
"
|
"
|
||||||
|
|
||||||
- name: "SSH and Deploy"
|
- name: "SSH and Deploy"
|
||||||
run: |
|
run: |
|
||||||
ssh -q -A -o StrictHostKeyChecking=no albert@warsaw-ovh-01 \
|
ssh -q -A -o StrictHostKeyChecking=no albert@warsaw-ovh-01 \
|
||||||
"
|
"
|
||||||
set -x
|
set -x
|
||||||
eval (ssh-agent -c)
|
eval (ssh-agent -c)
|
||||||
ssh-add
|
ssh-add
|
||||||
env | grep SSH
|
env | grep SSH
|
||||||
cd /etc/nixos/git
|
cd /etc/nixos/git
|
||||||
git pull
|
git pull
|
||||||
ssh -qA osaka-linode-01 'sudo systemctl restart podman-derp'
|
ssh -qA osaka-linode-01 'sudo systemctl restart podman-derp'
|
||||||
ssh -qA frankfurt-linode-01 'sudo systemctl restart podman-derp'
|
ssh -qA frankfurt-linode-01 'sudo systemctl restart podman-derp'
|
||||||
ssh -qA milan-linode-01 'sudo systemctl restart podman-derp'
|
ssh -qA milan-linode-01 'sudo systemctl restart podman-derp'
|
||||||
ssh -qA warsaw-ovh-01 'sudo systemctl restart container@rdesktop'
|
ssh -qA warsaw-ovh-01 'sudo systemctl restart container@rdesktop'
|
||||||
sleep 30
|
sleep 30
|
||||||
deploy -sd
|
deploy -sd
|
||||||
"
|
"
|
||||||
|
|
||||||
- name: "nixos-version (Post)"
|
- name: "nixos-version (Post)"
|
||||||
run: |
|
run: |
|
||||||
ssh -q -A -o StrictHostKeyChecking=no albert@warsaw-ovh-01 \
|
ssh -q -A -o StrictHostKeyChecking=no albert@warsaw-ovh-01 \
|
||||||
"
|
"
|
||||||
nixos-version
|
nixos-version
|
||||||
"
|
"
|
||||||
tailscale down
|
tailscale down
|
||||||
|
|
||||||
- if: success()
|
- if: success()
|
||||||
uses: https://git.sysctl.io/actions/gotify-action@master
|
uses: https://git.sysctl.io/actions/gotify-action@master
|
||||||
with:
|
with:
|
||||||
gotify_api_base: '${{ secrets.GOTIFY_URL }}'
|
gotify_api_base: '${{ secrets.GOTIFY_URL }}'
|
||||||
gotify_app_token: '${{ secrets.GOTIFY_TOKEN }}'
|
gotify_app_token: '${{ secrets.GOTIFY_TOKEN }}'
|
||||||
notification_title: '[ ${{ github.repository }}: ${{ github.workflow }} ] NixOS Deployed'
|
notification_title: '[ ${{ github.repository }}: ${{ github.workflow }} ] NixOS Deployed'
|
||||||
notification_message: 'Deployment completed successfully.'
|
notification_message: 'Deployment completed successfully.'
|
||||||
name: "Send Notification - Success"
|
name: "Send Notification - Success"
|
||||||
- if: failure()
|
- if: failure()
|
||||||
uses: https://git.sysctl.io/actions/gotify-action@master
|
uses: https://git.sysctl.io/actions/gotify-action@master
|
||||||
with:
|
with:
|
||||||
gotify_api_base: '${{ secrets.GOTIFY_URL }}'
|
gotify_api_base: '${{ secrets.GOTIFY_URL }}'
|
||||||
gotify_app_token: '${{ secrets.GOTIFY_TOKEN }}'
|
gotify_app_token: '${{ secrets.GOTIFY_TOKEN }}'
|
||||||
notification_title: '[ ${{ github.repository }}: ${{ github.workflow }} ] Deployment Failed'
|
notification_title: '[ ${{ github.repository }}: ${{ github.workflow }} ] Deployment Failed'
|
||||||
notification_message: 'Your deployment has failed. Check Forgejo.'
|
notification_message: 'Your deployment has failed. Check Forgejo.'
|
||||||
name: "Send Notification - Failure"
|
name: "Send Notification - Failure"
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
# yamllint disable rule:line-length rule:truthy
|
||||||
|
---
|
||||||
name: update-flake-lock
|
name: update-flake-lock
|
||||||
run-name: ${{ github.actor }} - update-flake-lock
|
run-name: ${{ github.actor }} - update-flake-lock
|
||||||
on:
|
on:
|
||||||
|
@ -13,105 +15,105 @@ jobs:
|
||||||
image: ubuntu:24.04
|
image: ubuntu:24.04
|
||||||
options: --mount type=bind,src=/dev/net/tun,dst=/dev/net/tun --privileged
|
options: --mount type=bind,src=/dev/net/tun,dst=/dev/net/tun --privileged
|
||||||
steps:
|
steps:
|
||||||
- name: "Runner: Info"
|
- name: "Runner: Info"
|
||||||
run: |
|
run: |
|
||||||
set -x
|
set -x
|
||||||
pwd
|
pwd
|
||||||
ls -lah
|
ls -lah
|
||||||
id
|
id
|
||||||
uname -a
|
uname -a
|
||||||
hostname
|
hostname
|
||||||
cat /etc/os-release
|
cat /etc/os-release
|
||||||
whoami
|
whoami
|
||||||
id
|
id
|
||||||
cat /etc/resolv.conf
|
cat /etc/resolv.conf
|
||||||
|
|
||||||
- name: "Setup: Runner"
|
- name: "Setup: Runner"
|
||||||
run: |
|
run: |
|
||||||
apt update -y
|
apt update -y
|
||||||
apt install git nodejs nix-bin sudo curl -y
|
apt install git nodejs nix-bin sudo curl -y
|
||||||
git config --global user.email "${{github.actor}}"
|
git config --global user.email "${{github.actor}}"
|
||||||
git config --global user.name "Forgejo Runner"
|
git config --global user.name "Forgejo Runner"
|
||||||
echo "100.64.0.13 gotify.sysctl.io" >> /etc/hosts
|
echo "100.64.0.13 gotify.sysctl.io" >> /etc/hosts
|
||||||
|
|
||||||
- name: "Setup: Tailscale Repo"
|
- name: "Setup: Tailscale Repo"
|
||||||
run: |
|
run: |
|
||||||
mkdir -p --mode=0755 /usr/share/keyrings
|
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.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
|
curl -fsSL https://pkgs.tailscale.com/stable/ubuntu/lunar.tailscale-keyring.list | sudo tee /etc/apt/sources.list.d/tailscale.list
|
||||||
apt update -y
|
apt update -y
|
||||||
apt install tailscale -y
|
apt install tailscale -y
|
||||||
|
|
||||||
- name: "Setup: SSH"
|
- name: "Setup: SSH"
|
||||||
run: |
|
run: |
|
||||||
rm -rf /root/.ssh
|
rm -rf /root/.ssh
|
||||||
mkdir /root/.ssh
|
mkdir /root/.ssh
|
||||||
echo "${{ secrets.SSH_PUBLIC_KEY }}" > /root/.ssh/id_ed25519.pub
|
echo "${{ secrets.SSH_PUBLIC_KEY }}" > /root/.ssh/id_ed25519.pub
|
||||||
echo "${{ secrets.SSH_PRIVATE_KEY }}" > /root/.ssh/id_ed25519
|
echo "${{ secrets.SSH_PRIVATE_KEY }}" > /root/.ssh/id_ed25519
|
||||||
chmod 700 /root/.ssh
|
chmod 700 /root/.ssh
|
||||||
chmod 600 /root/.ssh/id_ed25519
|
chmod 600 /root/.ssh/id_ed25519
|
||||||
chmod 644 /root/.ssh/id_ed25519.pub
|
chmod 644 /root/.ssh/id_ed25519.pub
|
||||||
|
|
||||||
- name: "Setup: Headscale Network"
|
- name: "Setup: Headscale Network"
|
||||||
run: |
|
run: |
|
||||||
echo "tailscaled --cleanup"
|
echo "tailscaled --cleanup"
|
||||||
sudo tailscaled --cleanup
|
sudo tailscaled --cleanup
|
||||||
echo ""
|
echo ""
|
||||||
echo "tailscaled --state=mem 2> ~/tailscaled.log &"
|
echo "tailscaled --state=mem 2> ~/tailscaled.log &"
|
||||||
sudo tailscaled --state=mem: 2> ~/tailscaled.log &
|
sudo tailscaled --state=mem: 2> ~/tailscaled.log &
|
||||||
echo ""
|
echo ""
|
||||||
echo "tailscale up"
|
echo "tailscale up"
|
||||||
sudo tailscale up \
|
sudo tailscale up \
|
||||||
--login-server=https://headscale.sysctl.io \
|
--login-server=https://headscale.sysctl.io \
|
||||||
--accept-routes \
|
--accept-routes \
|
||||||
--accept-dns \
|
--accept-dns \
|
||||||
--authkey ${{ secrets.TAILSCALE_KEY }} \
|
--authkey ${{ secrets.TAILSCALE_KEY }} \
|
||||||
--hostname forgejo-runner \
|
--hostname forgejo-runner \
|
||||||
--advertise-tags "tag:forgejo,tag:container,tag:ephemeral"
|
--advertise-tags "tag:forgejo,tag:container,tag:ephemeral"
|
||||||
sudo tailscale status
|
sudo tailscale status
|
||||||
sudo tailscale netcheck
|
sudo tailscale netcheck
|
||||||
|
|
||||||
|
|
||||||
- name: "SSH and Update / Check"
|
- name: "SSH and Update / Check"
|
||||||
run: |
|
run: |
|
||||||
ssh -q -A -o StrictHostKeyChecking=no albert@warsaw-ovh-01 \
|
ssh -q -A -o StrictHostKeyChecking=no albert@warsaw-ovh-01 \
|
||||||
"
|
"
|
||||||
set -x
|
set -x
|
||||||
eval (ssh-agent -c)
|
eval (ssh-agent -c)
|
||||||
ssh-add
|
ssh-add
|
||||||
env | grep SSH
|
env | grep SSH
|
||||||
cd /etc/nixos/git
|
cd /etc/nixos/git
|
||||||
git pull
|
git pull
|
||||||
nix flake update
|
nix flake update
|
||||||
nix flake check --show-trace
|
nix flake check --show-trace
|
||||||
"
|
"
|
||||||
|
|
||||||
- if: success()
|
- if: success()
|
||||||
name: "Sucess: Git Commit & Push"
|
name: "Sucess: Git Commit & Push"
|
||||||
run: |
|
run: |
|
||||||
ssh -q -A -o StrictHostKeyChecking=no albert@warsaw-ovh-01 \
|
ssh -q -A -o StrictHostKeyChecking=no albert@warsaw-ovh-01 \
|
||||||
"
|
"
|
||||||
set -x
|
set -x
|
||||||
eval (ssh-agent -c)
|
eval (ssh-agent -c)
|
||||||
ssh-add
|
ssh-add
|
||||||
env | grep SSH
|
env | grep SSH
|
||||||
cd /etc/nixos/git
|
cd /etc/nixos/git
|
||||||
git -c commit.gpgsign=false commit -am '[ACTIONS] Flake Update (`date +%Y-%m-%d`)' \
|
git -c commit.gpgsign=false commit -am '[ACTIONS] Flake Update (`date +%Y-%m-%d`)' \
|
||||||
&& git push
|
&& git push
|
||||||
"
|
"
|
||||||
|
|
||||||
- if: success()
|
- if: success()
|
||||||
uses: https://git.sysctl.io/actions/gotify-action@master
|
uses: https://git.sysctl.io/actions/gotify-action@master
|
||||||
with:
|
with:
|
||||||
gotify_api_base: '${{ secrets.GOTIFY_URL }}'
|
gotify_api_base: '${{ secrets.GOTIFY_URL }}'
|
||||||
gotify_app_token: '${{ secrets.GOTIFY_TOKEN }}'
|
gotify_app_token: '${{ secrets.GOTIFY_TOKEN }}'
|
||||||
notification_title: '[ ${{ github.repository }}: ${{ github.workflow }} ] NixOS Flake Updated'
|
notification_title: '[ ${{ github.repository }}: ${{ github.workflow }} ] NixOS Flake Updated'
|
||||||
notification_message: 'Build completed successfully.'
|
notification_message: 'Build completed successfully.'
|
||||||
- if: failure()
|
- if: failure()
|
||||||
uses: https://git.sysctl.io/actions/gotify-action@master
|
uses: https://git.sysctl.io/actions/gotify-action@master
|
||||||
with:
|
with:
|
||||||
gotify_api_base: '${{ secrets.GOTIFY_URL }}'
|
gotify_api_base: '${{ secrets.GOTIFY_URL }}'
|
||||||
gotify_app_token: '${{ secrets.GOTIFY_TOKEN }}'
|
gotify_app_token: '${{ secrets.GOTIFY_TOKEN }}'
|
||||||
notification_title: '[ ${{ github.repository }}: ${{ github.workflow }} ] Build Failed'
|
notification_title: '[ ${{ github.repository }}: ${{ github.workflow }} ] Build Failed'
|
||||||
notification_message: 'Your build has failed. Check Forgejo.'
|
notification_message: 'Your build has failed. Check Forgejo.'
|
||||||
name: "Send Notification"
|
name: "Send Notification"
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
|
# yamllint disable rule:line-length rule:truthy
|
||||||
|
---
|
||||||
name: update-steamdeck
|
name: update-steamdeck
|
||||||
run-name: ${{ github.actor }} - update-steamdeck
|
run-name: ${{ github.actor }} - update-steamdeck
|
||||||
on:
|
on:
|
||||||
|
@ -15,106 +16,106 @@ jobs:
|
||||||
image: ubuntu:23.10
|
image: ubuntu:23.10
|
||||||
options: --mount type=bind,src=/dev/net/tun,dst=/dev/net/tun --privileged
|
options: --mount type=bind,src=/dev/net/tun,dst=/dev/net/tun --privileged
|
||||||
steps:
|
steps:
|
||||||
- name: "Runner: Info"
|
- name: "Runner: Info"
|
||||||
run: |
|
run: |
|
||||||
set -x
|
set -x
|
||||||
pwd
|
pwd
|
||||||
ls -lah
|
ls -lah
|
||||||
id
|
id
|
||||||
uname -a
|
uname -a
|
||||||
hostname
|
hostname
|
||||||
cat /etc/os-release
|
cat /etc/os-release
|
||||||
whoami
|
whoami
|
||||||
id
|
id
|
||||||
cat /etc/resolv.conf
|
cat /etc/resolv.conf
|
||||||
|
|
||||||
- name: "Setup: Runner"
|
- name: "Setup: Runner"
|
||||||
run: |
|
run: |
|
||||||
apt update -y
|
apt update -y
|
||||||
apt install git nodejs nix-bin sudo sudo curl -y
|
apt install git nodejs nix-bin sudo sudo curl -y
|
||||||
git config user.email "${{github.actor}}"
|
git config user.email "${{github.actor}}"
|
||||||
git config user.name "Forgejo Runner"
|
git config user.name "Forgejo Runner"
|
||||||
echo "100.64.0.13 gotify.sysctl.io" >> /etc/hosts
|
echo "100.64.0.13 gotify.sysctl.io" >> /etc/hosts
|
||||||
|
|
||||||
- name: "Setup: Tailscale Repo"
|
- name: "Setup: Tailscale Repo"
|
||||||
run: |
|
run: |
|
||||||
mkdir -p --mode=0755 /usr/share/keyrings
|
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.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
|
curl -fsSL https://pkgs.tailscale.com/stable/ubuntu/lunar.tailscale-keyring.list | sudo tee /etc/apt/sources.list.d/tailscale.list
|
||||||
apt update -y
|
apt update -y
|
||||||
apt install tailscale -y
|
apt install tailscale -y
|
||||||
|
|
||||||
- name: "Setup: SSH"
|
- name: "Setup: SSH"
|
||||||
run: |
|
run: |
|
||||||
rm -rf /root/.ssh
|
rm -rf /root/.ssh
|
||||||
mkdir /root/.ssh
|
mkdir /root/.ssh
|
||||||
echo "${{ secrets.SSH_PUBLIC_KEY }}" > /root/.ssh/id_ed25519.pub
|
echo "${{ secrets.SSH_PUBLIC_KEY }}" > /root/.ssh/id_ed25519.pub
|
||||||
echo "${{ secrets.SSH_PRIVATE_KEY }}" > /root/.ssh/id_ed25519
|
echo "${{ secrets.SSH_PRIVATE_KEY }}" > /root/.ssh/id_ed25519
|
||||||
chmod 700 /root/.ssh
|
chmod 700 /root/.ssh
|
||||||
chmod 600 /root/.ssh/id_ed25519
|
chmod 600 /root/.ssh/id_ed25519
|
||||||
chmod 644 /root/.ssh/id_ed25519.pub
|
chmod 644 /root/.ssh/id_ed25519.pub
|
||||||
echo "Public Key: "
|
echo "Public Key: "
|
||||||
cat /root/.ssh/id_ed25519.pub
|
cat /root/.ssh/id_ed25519.pub
|
||||||
|
|
||||||
- name: "Setup: Headscale Network"
|
- name: "Setup: Headscale Network"
|
||||||
run: |
|
run: |
|
||||||
echo "tailscaled --cleanup"
|
echo "tailscaled --cleanup"
|
||||||
sudo tailscaled --cleanup
|
sudo tailscaled --cleanup
|
||||||
echo ""
|
echo ""
|
||||||
echo "tailscaled --state=mem 2> ~/tailscaled.log &"
|
echo "tailscaled --state=mem 2> ~/tailscaled.log &"
|
||||||
sudo tailscaled --state=mem: 2> ~/tailscaled.log &
|
sudo tailscaled --state=mem: 2> ~/tailscaled.log &
|
||||||
echo ""
|
echo ""
|
||||||
echo "tailscale up"
|
echo "tailscale up"
|
||||||
sudo tailscale up \
|
sudo tailscale up \
|
||||||
--login-server=https://headscale.sysctl.io \
|
--login-server=https://headscale.sysctl.io \
|
||||||
--accept-routes \
|
--accept-routes \
|
||||||
--accept-dns \
|
--accept-dns \
|
||||||
--authkey ${{ secrets.TAILSCALE_KEY }} \
|
--authkey ${{ secrets.TAILSCALE_KEY }} \
|
||||||
--hostname forgejo-runner \
|
--hostname forgejo-runner \
|
||||||
--advertise-tags "tag:forgejo,tag:container,tag:ephemeral"
|
--advertise-tags "tag:forgejo,tag:container,tag:ephemeral"
|
||||||
sudo tailscale status
|
sudo tailscale status
|
||||||
sudo tailscale netcheck
|
sudo tailscale netcheck
|
||||||
|
|
||||||
- name: "nixos-version (Pre)"
|
- name: "nixos-version (Pre)"
|
||||||
run: |
|
run: |
|
||||||
ssh -q -A -o StrictHostKeyChecking=no albert@steamdeck \
|
ssh -q -A -o StrictHostKeyChecking=no albert@steamdeck \
|
||||||
"
|
"
|
||||||
nixos-version
|
nixos-version
|
||||||
"
|
"
|
||||||
|
|
||||||
- name: "SSH and Deploy"
|
- name: "SSH and Deploy"
|
||||||
run: |
|
run: |
|
||||||
ssh -o StrictHostKeyChecking=no albert@steamdeck \
|
ssh -o StrictHostKeyChecking=no albert@steamdeck \
|
||||||
"
|
"
|
||||||
set -x
|
set -x
|
||||||
source ~/.config/fish/config.fish
|
source ~/.config/fish/config.fish
|
||||||
cd /etc/nixos/git
|
cd /etc/nixos/git
|
||||||
git pull
|
git pull
|
||||||
sudo nixos-rebuild switch --flake /etc/nixos/git
|
sudo nixos-rebuild switch --flake /etc/nixos/git
|
||||||
home-manager switch -b backup --flake /etc/nixos/git
|
home-manager switch -b backup --flake /etc/nixos/git
|
||||||
"
|
"
|
||||||
|
|
||||||
- name: "nixos-version (Post)"
|
- name: "nixos-version (Post)"
|
||||||
run: |
|
run: |
|
||||||
ssh -q -A -o StrictHostKeyChecking=no albert@steamdeck \
|
ssh -q -A -o StrictHostKeyChecking=no albert@steamdeck \
|
||||||
"
|
"
|
||||||
nixos-version
|
nixos-version
|
||||||
"
|
"
|
||||||
tailscale down
|
tailscale down
|
||||||
|
|
||||||
- if: success()
|
- if: success()
|
||||||
uses: https://git.sysctl.io/actions/gotify-action@master
|
uses: https://git.sysctl.io/actions/gotify-action@master
|
||||||
with:
|
with:
|
||||||
gotify_api_base: '${{ secrets.GOTIFY_URL }}'
|
gotify_api_base: '${{ secrets.GOTIFY_URL }}'
|
||||||
gotify_app_token: '${{ secrets.GOTIFY_TOKEN }}'
|
gotify_app_token: '${{ secrets.GOTIFY_TOKEN }}'
|
||||||
notification_title: '[ ${{ github.repository }}: ${{ github.workflow }} ] Steam Deck Updated'
|
notification_title: '[ ${{ github.repository }}: ${{ github.workflow }} ] Steam Deck Updated'
|
||||||
notification_message: 'Deployment completed successfully.'
|
notification_message: 'Deployment completed successfully.'
|
||||||
name: "Send Notification - Success"
|
name: "Send Notification - Success"
|
||||||
- if: failure()
|
- if: failure()
|
||||||
uses: https://git.sysctl.io/actions/gotify-action@master
|
uses: https://git.sysctl.io/actions/gotify-action@master
|
||||||
with:
|
with:
|
||||||
gotify_api_base: '${{ secrets.GOTIFY_URL }}'
|
gotify_api_base: '${{ secrets.GOTIFY_URL }}'
|
||||||
gotify_app_token: '${{ secrets.GOTIFY_TOKEN }}'
|
gotify_app_token: '${{ secrets.GOTIFY_TOKEN }}'
|
||||||
notification_title: '[ ${{ github.repository }}: ${{ github.workflow }} ] Deployment Failed'
|
notification_title: '[ ${{ github.repository }}: ${{ github.workflow }} ] Deployment Failed'
|
||||||
notification_message: 'Your deployment has failed. Check Forgejo.'
|
notification_message: 'Your deployment has failed. Check Forgejo.'
|
||||||
name: "Send Notification - Failure"
|
name: "Send Notification - Failure"
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{ config, username, ... }: {
|
{ ... }: {
|
||||||
programs.atuin = {
|
programs.atuin = {
|
||||||
enable = true;
|
enable = true;
|
||||||
enableBashIntegration = true;
|
enableBashIntegration = true;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{ inputs, pkgs, system, ... }: {
|
{ pkgs, ... }: {
|
||||||
imports = [ ./small.nix ];
|
imports = [ ./small.nix ];
|
||||||
|
|
||||||
# List packages installed in system profile
|
# List packages installed in system profile
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{ inputs, config, lib, pkgs, modulesPath, hostname, username, system, ... }: {
|
{ inputs, config, lib, modulesPath, system, ... }: {
|
||||||
imports = [
|
imports = [
|
||||||
(modulesPath + "/installer/scan/not-detected.nix")
|
(modulesPath + "/installer/scan/not-detected.nix")
|
||||||
../../common/services/tailscale-autoconnect.nix
|
../../common/services/tailscale-autoconnect.nix
|
||||||
|
|
Loading…
Reference in a new issue