2024-08-21 15:33:33 +02:00
|
|
|
#!/usr/bin/env nix-shell
|
|
|
|
#! nix-shell -i bash -p skopeo nix-prefetch-docker
|
|
|
|
|
|
|
|
set -euo pipefail
|
|
|
|
|
|
|
|
while [[ $# -gt 0 ]]; do
|
|
|
|
case $1 in
|
|
|
|
*)
|
|
|
|
echo "Unknown option $1"
|
|
|
|
exit 1
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
done
|
|
|
|
|
|
|
|
IMAGE=$(nix-prefetch-docker --image-name nixos/nix --image-tag latest --arch amd64 --os linux)
|
|
|
|
|
|
|
|
cat > ./pkgs/build-worker-oci/source.nix << EOF
|
|
|
|
{
|
|
|
|
dockerTools,
|
|
|
|
}:
|
|
|
|
|
|
|
|
dockerTools.pullImage ${IMAGE}
|
|
|
|
EOF
|
2024-09-03 14:59:50 +02:00
|
|
|
|
|
|
|
nix build .\#packages.x86_64-linux.build-worker-oci
|
|
|
|
|
|
|
|
skopeo --insecure-policy copy docker-archive:"result" \
|
|
|
|
docker://registry.fly.io/build-worker-kyoumanet:latest --dest-creds x:"$(flyctl auth token)" --format v2s2
|
|
|
|
|
|
|
|
rm "result"
|
|
|
|
|
2024-12-10 11:46:27 +01:00
|
|
|
fly deploy --app build-worker-kyoumanet
|
|
|
|
fly deploy --app build-worker-kyoumanet-cdg
|