Files
nix-builder-image/justfile

65 lines
1.4 KiB
Makefile

# by default list all just commands
default:
just --list
# run all tests
test:
#!/usr/bin/env bash
set -euxo pipefail
# would love test: fmt to make sure formatting happens but in WSL formatting is slow...
# poor filesystem access performance
echo "testing..."
nix flake check
# uv run ruff check src tests
# format code
fmt:
#!/usr/bin/env bash
set -euxo pipefail
nix fmt
# build docker image
build:
#!/usr/bin/env bash
set -euxo pipefail
nix build .#act-runner-image
# load the image into docker
load:
#!/usr/bin/env bash
set -euxo pipefail
docker load < result
# build and load in one step
build-load: build load
echo "Image loaded successfully!"
# print image information
info:
#!/usr/bin/env bash
set -euxo pipefail
docker inspect nix-gitea-act-runner:latest
dive:
#!/usr/bin/env bash
set -euxo pipefail
dive nix-gitea-act-runner:latest
# release the app, checking that our working tree is clean and ready for release, optionally takes target version
release version="":
#!/usr/bin/env bash
set -euxo pipefail
if [[ -n "{{ version }}" ]]; then
./scripts/release.sh {{ version }}
else
./scripts/release.sh
fi
# Exec into the most recently built version
exec:
#!/usr/bin/env bash
set -euxo pipefail
docker run -it nix-gitea-act-runner /bin/bash