lewa/.drone.yml

35 lines
826 B
YAML

kind: pipeline
name: book
workspace:
base: /lewa
steps:
- name: build book docker image
image: "monacoremo/nix:2020-04-05-05f09348-circleci"
commands:
- mkdir -p ~/.config/nixpkgs
- echo '{ allowUnfree = true; }' > ~/.config/nixpkgs/config.nix
- nix-env -iA cachix -f https://cachix.org/api/v1/install
- cachix use xe
- cd book && nix-build
- cp $(readlink result) /lewa/result/docker.tgz
volumes:
- name: book
path: /lewa/result
- name: push image
image: docker:dind
volumes:
- name: book
path: /lewa/result
- name: dockersock
path: /var/run/docker.sock
commands:
- docker import -f /lewa/result/docker.tgz
volumes:
- name: book
temp: {}
- name: dockersock
host:
path: /var/run/docker.sock