Replace Docker with Skopeo

This commit is contained in:
Pim Kunis 2024-04-28 20:17:08 +02:00
parent 02dea6fe5c
commit 687d16c49e
2 changed files with 8 additions and 10 deletions

View file

@ -12,7 +12,8 @@ jobs:
/bin/attic login local https://attic.kun.is ${{ secrets.ATTIC_TOKEN }}
/bin/attic use home
- name: Log into container registry
run: echo -n "${{ secrets.RUNNER_TOKEN }}" | /bin/docker login https://git.kun.is --username pim --password-stdin
# run: echo -n "${{ secrets.RUNNER_TOKEN }}" | /bin/docker login https://git.kun.is --username pim --password-stdin
run: /bin/docker login -u pim -p ${{ secrets.RUNNER_TOKEN }} https://git.kun.is
- name: Build Pim's blog
run: nix build --extra-experimental-features nix-command --extra-experimental-features flakes --out-link blog-pim ./checkout#packages.x86_64-linux.blog-pim
- name: Push Pim's blog to Nix cache

View file

@ -20,7 +20,9 @@ let
nixConfDrv = pkgs.stdenv.mkDerivation {
name = "nix.conf";
dontUnpack = true;
installPhase = "install -Dm755 ${nixConf} $out/etc/nix/nix.conf";
installPhase = ''
install -Dm755 ${nixConf} $out/etc/nix/nix.conf
'';
};
in
{
@ -31,14 +33,9 @@ in
copyToRoot = pkgs.buildEnv {
name = "image-root";
paths = with pkgs; [ coreutils attic-client docker-client nixConfDrv ];
pathsToLink = [ "/bin" "/etc/nix" ];
# TODO: Maybe we don't even want these binaries in the base image, but run everything through nix-run?
paths = with pkgs; [ coreutils attic-client skopeo nixConfDrv ];
pathsToLink = [ "/bin" "/etc" ];
};
# config = {
# Env = [
# "PATH=/bin:/root/.nix-profile/bin:/nix/var/nix/profiles/default/bin:/nix/var/nix/profiles/default/sbin"
# ];
# };
};
})