Skip to content

[nixos/server] use nix-shell action #7

[nixos/server] use nix-shell action

[nixos/server] use nix-shell action #7

Workflow file for this run

name: Deploy Server
on:
push:
branches:
- master
paths:
- 'nixos/server'
workflow_dispatch:
workflow_call:
secrets:
SSH_PRIVATE_KEY:
required: true
SSH_CONFIG:
required: true
KNOWN_HOSTS:
required: true
jobs:
deploy-server:

Check failure on line 21 in .github/workflows/deploy-server.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/deploy-server.yml

Invalid workflow file

You have an error in your yaml syntax on line 21
runs-on: ubuntu-latest
steps:
- name: Install SSH key
uses: shimataro/ssh-key-action@v2
with:
key: ${{ secrets.SSH_PRIVATE_KEY }}
name: id_rsa # optional
known_hosts: ${{ secrets.KNOWN_HOSTS }}
config: ${{ secrets.SSH_CONFIG }} # ssh_config; optional
if_key_exists: fail
- uses: actions/[email protected]
with:
fetch-depth: 0
- uses: cachix/install-nix-action@v18
with:
nix_path: nixpkgs=channel:nixos-23.11
- uses: workflow/nix-shell-action@v3
with:
packages: nixos-rebuild
working-directory: ./nixos/server
script: |
nixos-rebuild switch --verbose --fast --flake ".#nixos" --use-remote-sudo --target-host "[email protected]" --build-host "[email protected]" --builders "ssh://[email protected] aarch64-linux"
nixos-rebuild switch --verbose --fast --flake ".#nixos" --use-remote-sudo --target-host "[email protected]" --build-host "[email protected]" --builders '"ssh://[email protected] aarch64-linux"'