nix-containers/.drone.yml

21 lines
1 KiB
YAML
Raw Normal View History

2022-06-26 05:33:17 +00:00
---
kind: pipeline
type: docker
name: Build containers
steps:
- name: buildImage
image: nixos/nix
commands:
- echo "substituters = https://cache.nixos.org/ https://f000.backblazeb2.com/file/cache-chir-rs/" >> /etc/nix/nix.conf
- echo "trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= nixcache:8KKuGz95Pk4UJ5W/Ni+pN+v+LDTkMMFV4yrGmAYgkDg= hydra.nixos.org-1:CNHJZBh9K4tP3EKF6FkkgeVYsS3ohTl+oS0Qa8bezVs=" >> /etc/nix/nix.conf
- echo "experimental-features = nix-command flakes" >> /etc/nix/nix.conf
2022-06-26 05:54:43 +00:00
- mkdir /etc/containers
2022-06-26 05:55:19 +00:00
- |
2022-06-26 05:58:46 +00:00
echo '{"default": [{"type":"insecureAcceptAnything"}]}' > /etc/containers/policy.json
2022-06-26 05:38:00 +00:00
- nix-env -iA nixpkgs.skopeo
2022-06-26 05:46:32 +00:00
- $(nix build '.#buildImage') | gzip --fast | skopeo copy --dest-creds=gitea-bot:$GITEA_KEY docker-archive:/dev/stdin docker://git.chir.rs/darkkirb/nix-containers:buildImage --dest-compress-format zstd --dest-compress-level 12
2022-06-26 05:33:17 +00:00
environment:
GITEA_KEY:
from_secret: GITEA_KEY