Add Gitea deploy and NixOS switch workflows
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
name: NixOS switch cloud-pc
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
paths:
|
||||
- ".gitea/workflows/nixos-switch-cloud-pc.yml"
|
||||
- "nixos/**"
|
||||
|
||||
jobs:
|
||||
switch:
|
||||
runs-on: cloud-pc-nixos
|
||||
steps:
|
||||
- name: Sync repo
|
||||
run: |
|
||||
git config --global --replace-all safe.directory /opt/services
|
||||
git -C /opt/services pull --ff-only
|
||||
|
||||
- name: Switch NixOS generation
|
||||
run: sudo /run/current-system/sw/bin/nixos-rebuild switch --flake /opt/services/nixos#cloud-pc
|
||||
Reference in New Issue
Block a user