#17 Fix long-lived typo in cluster name
"Silver-hand" -> "Silver-flame"
This commit is contained in:
parent
0c66fa4a0b
commit
c351329640
46
.gitea/workflows/silver-flame-deploy.yaml
Normal file
46
.gitea/workflows/silver-flame-deploy.yaml
Normal 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
|
@ -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
|
Loading…
Reference in New Issue
Block a user