nix-configs/.woodpecker/build-cache.yaml
Lucy Hochkamp 7cb4b1be69
Some checks failed
ci/woodpecker/push/build-cache Pipeline failed
meow
2025-10-10 18:51:04 +02:00

53 lines
2.1 KiB
YAML

when:
- event: push
branch: main
steps:
- name: build-push
image: ghcr.io/lix-project/lix:latest
environment:
ATTIC_ENDPOINT: https://attic.hailsatan.eu
ATTIC_CACHE: xyno
ATTIC_PUSH_TOKEN:
from_secret: attic_push_token
commands:
- |
export green="$(echo -e '\e[1;32m')"
export yellow="$(echo -e '\e[1;33m')"
export reset="$(echo -e '\e[0m')"
- |
cat > /etc/nix/nix.conf << EOF
# default settings in the docker image
build-users-group = nixbld
sandbox = false
# additional settings
experimental-features = nix-command flakes
substituters = https://attic.hailsatan.eu/xyno https://cache.nixos.org/
trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= xyno:l2mXaEYOj2kSjxT1dbP1iVya1bBXmKuO7jRXUZohi8c=
trusted-substituters = https://attic.hailsatan.eu/xyno
EOF
- nix build ".#nix" --print-build-logs --out-link nix --no-update-lock-file
- nix profile remove lix
- ./nix/bin/nix profile install ".#nix" --no-update-lock-file
- nix profile install ".#nix-ci" ".#attic-client" ".#jq" --no-update-lock-file
- nix --version
- attic login default $${ATTIC_ENDPOINT} $${ATTIC_PUSH_TOKEN}
- attic use $${ATTIC_CACHE}
- attic push $${ATTIC_CACHE} $(nix build --print-build-logs --no-update-lock-file --no-link --print-out-paths .#nix-ci)
# - attic watch-store $${ATTIC_CACHE} &
# - nix build .#nixosConfigurations.ds9.config.system.build.toplevel .#nixosConfigurations.picard.config.system.build.toplevel .#nixosConfigurations.theseus.config.system.build.toplevel
# - nix flake archive --json .
# - attic push xyno $(nix flake archive --json . | jq -r '[.. | .path? | select(. != null)] | unique | .[]')
# - mkdir /tmp/reports
- nix-ci --check-cached --copy-to-attic $${ATTIC_CACHE} --flake-path .#hydraJobs.systems
# - name: junit-reports
# image: ghcr.io/wgroeneveld/woodpecker-ascii-junit:main
# settings:
# log-level: debug
# path: /tmp/reports/**/*.xml
# when:
# status: [
# 'success',
# 'failure',
# ]