#17 Fix long-lived typo in cluster name

"Silver-hand" -> "Silver-flame"
This commit is contained in:
Joey Hafner 2024-10-25 18:11:16 -07:00
parent 0c66fa4a0b
commit c351329640
No known key found for this signature in database
2 changed files with 46 additions and 28 deletions

View File

@ -0,0 +1,46 @@
name: Deploy NixOS System Configurations to Silver-Flame Hosts
on:
push:
branches: [ main ]
paths: [ 'homelab/silver-flame/**' ]
jobs:
deploy:
defaults:
run:
working-directory: homelab/silver-flame
runs-on: ubuntu-latest
steps:
- name: Checkout Jafner.net repo
uses: actions/checkout@v4
- name: Install jq
run: sudo apt-get update && sudo apt-get install jq
- name: Install Nix
uses: cachix/install-nix-action@v30
with:
github_access_token: ${{ secrets.RUNNER_GITHUB_TOKEN }}
nix_path: nixpkgs=channel:nixos-24.05
- name: Configure SSH key
run: |
echo -e "${{ secrets.RUNNER_SSH_PRIVATEKEY }}" > /tmp/key
chmod 600 /tmp/key
ssh -i /tmp/key
- name: Get list of hosts
run: |
nix eval --json .#deploy.nodes --apply 'builtins.attrValues' |\
jq -r '.[].hostname' | xargs echo > /tmp/hostlist
- name: Add known hosts
run: |
mkdir -p ~/.ssh && touch ~/.ssh/known_hosts && chmod 600 ~/.ssh/known_hosts
for host in $(cat /tmp/hostlist); do
ssh-keyscan -t ed25519 $host >> ~/.ssh/known_hosts
done
- name: Test SSH connections
run: |
for host in $(cat /tmp/hostlist); do
ssh -i /tmp/key root@$host 'whoami; echo $HOSTNAME'
done
# - name: Run deploy-rs from flake
# run: |
# nix run github:serokell/deploy-rs#defaultPackage.x86_64-linux -- --version

View File

@ -1,28 +0,0 @@
name: Deploy NixOS System Configurations to Silver-Hand Hosts
on:
push:
branches: [ main ]
paths: [ 'nix/nix-lab/**' ]
jobs:
deploy:
defaults:
run:
working-directory: nix/nix-lab
runs-on: ubuntu-latest
steps:
- name: Checkout Jafner.net repo
uses: actions/checkout@v4
- name: Install Nix
uses: cachix/install-nix-action@v30
with:
github_access_token: ${{ secrets.RUNNER_GITHUB_TOKEN }}
nix_path: nixpkgs=channel:nixos-24.05
- name: Check Nix Install
run: |
nix flake show github:NixOS/nixpkgs
nix --version
- name: Run deploy-rs from flake
run: |
nix run github:serokell/deploy-rs#defaultPackage.x86_64-linux -- --version