forgejo-ci-runners/README.md

31 lines
766 B
Markdown
Raw Permalink Normal View History

2024-09-13 18:21:12 -05:00
# Incus VM Build and Deploy
## Quick Start
### Prerequisites:
Add your forgejo runner token in 1Password at `op://forgejo-runner/forgejo-runner/runner_token`
### Build, import, and deploy
2024-09-13 18:21:12 -05:00
```sh
mise run build_import
mise run launch
2024-09-13 18:21:12 -05:00
```
## Manually
2024-09-13 18:21:12 -05:00
### Build
2024-09-13 18:21:12 -05:00
```sh
qemuImageBuildPath=$(nix build .#nixosConfigurations.lxc-vm-x86_64.config.system.build.qemuImage --print-out-paths)
metadataBuildPath=$(nix build .#nixosConfigurations.lxc-vm-x86_64.config.system.build.metadata --print-out-paths)
```
2024-09-13 18:21:12 -05:00
### Deploy
2024-09-13 18:21:12 -05:00
```sh
incus image import --alias nixos-gen/custom/lxc-vm-x86_64 ${metadataPath}/tarball/nixos-system-x86_64-linux.tar.xz ${qemuImageOutputPath}/nixos.qcow2
incus file push "$TOKEN_FILE" "$INCUS_INSTANCE/var/lib/forgejo/$TOKEN_FILE" --mode 400
```