This repository has been archived on 2026-04-18. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
dotfiles/.gitea/workflows/deploy.yml

59 lines
1.8 KiB
YAML

name: Build
on:
push:
branches: [main]
jobs:
build:
runs-on: nix
steps:
- uses: https://github.com/actions/checkout@v4
with:
fetch-depth: 0
- name: Unlock git-crypt
run: |
git-crypt unlock /run/agenix/git-crypt-key-dotfiles
- name: Build NixOS configuration (yarn)
run: |
nix build .#nixosConfigurations.yarn.config.system.build.toplevel -L
- name: Record yarn store path for pull-update
continue-on-error: true
run: |
mkdir -p /var/lib/dotfiles-deploy
readlink -f result > /var/lib/dotfiles-deploy/yarn
nix-store --add-root /var/lib/dotfiles-deploy/yarn-gcroot -r "$(readlink -f result)"
- name: Build NixOS configuration (mreow)
run: |
nix build .#nixosConfigurations.mreow.config.system.build.toplevel -L
- name: Record mreow store path
continue-on-error: true
run: |
mkdir -p /var/lib/dotfiles-deploy
readlink -f result > /var/lib/dotfiles-deploy/mreow
nix-store --add-root /var/lib/dotfiles-deploy/mreow-gcroot -r "$(readlink -f result)"
- name: Notify success
if: success()
run: |
curl -sf -X POST \
"https://ntfy.sigkill.computer/deployments" \
-H "Title: [dotfiles] Build succeeded" \
-H "Priority: default" \
-H "Tags: white_check_mark" \
-d "dotfiles built from commit ${GITHUB_SHA::8}"
- name: Notify failure
if: failure()
run: |
curl -sf -X POST \
"https://ntfy.sigkill.computer/deployments" \
-H "Title: [dotfiles] Build FAILED" \
-H "Priority: urgent" \
-H "Tags: rotating_light" \
-d "dotfiles build failed at commit ${GITHUB_SHA::8}"