Add Gitea deploy and NixOS switch workflows
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
name: Deploy cloud-pc
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
stack:
|
||||
description: "Stack to deploy (leave empty to reconcile all)"
|
||||
required: false
|
||||
push:
|
||||
paths:
|
||||
- ".gitea/workflows/deploy-cloud-pc.yml"
|
||||
- "cloud-pc/**"
|
||||
- "scripts/deploy.sh"
|
||||
schedule:
|
||||
- cron: "0 4 * * *"
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
runs-on: cloud-pc
|
||||
steps:
|
||||
- name: Sync repo
|
||||
run: |
|
||||
git config --global --replace-all safe.directory /opt/services
|
||||
git -C /opt/services pull --ff-only
|
||||
|
||||
- name: Deploy stacks
|
||||
run: /opt/services/scripts/deploy.sh cloud-pc "${{ inputs.stack }}"
|
||||
@@ -0,0 +1,27 @@
|
||||
name: Deploy mini-pc
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
stack:
|
||||
description: "Stack to deploy (leave empty to reconcile all)"
|
||||
required: false
|
||||
push:
|
||||
paths:
|
||||
- ".gitea/workflows/deploy-mini-pc.yml"
|
||||
- "mini-pc/**"
|
||||
- "scripts/deploy.sh"
|
||||
schedule:
|
||||
- cron: "0 4 * * *"
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
runs-on: mini-pc
|
||||
steps:
|
||||
- name: Sync repo
|
||||
run: |
|
||||
git config --global --replace-all safe.directory /opt/services
|
||||
git -C /opt/services pull --ff-only
|
||||
|
||||
- name: Deploy stacks
|
||||
run: /opt/services/scripts/deploy.sh mini-pc "${{ inputs.stack }}"
|
||||
@@ -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
|
||||
@@ -0,0 +1,20 @@
|
||||
name: NixOS switch mini-pc
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
paths:
|
||||
- ".gitea/workflows/nixos-switch-mini-pc.yml"
|
||||
- "nixos/**"
|
||||
|
||||
jobs:
|
||||
switch:
|
||||
runs-on: mini-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#mini-pc
|
||||
Reference in New Issue
Block a user