Remove the DinD-based k8s runner and add a native systemd Forgejo Actions runner on ringtail for building containers with nix build and pushing via skopeo. The runner uses the NixOS services.gitea-actions-runner module with host execution (no containers), and Ansible provisions the registration token from 1Password. Adds a new build-container-nix workflow for -nix- tags and updates mise tasks to support both Dockerfile and Nix builds. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
53 lines
1.3 KiB
Bash
Executable file
53 lines
1.3 KiB
Bash
Executable file
#!/usr/bin/env bash
|
|
#MISE description="List available containers and their recent tags"
|
|
|
|
set -euo pipefail
|
|
|
|
REGISTRY="registry.ops.eblu.me"
|
|
CONTAINER_DIR="containers"
|
|
|
|
echo "Container Images"
|
|
echo "================"
|
|
echo ""
|
|
|
|
# Find all container directories with Dockerfiles or default.nix
|
|
for dir in "$CONTAINER_DIR"/*/; do
|
|
[[ -d "$dir" ]] || continue
|
|
|
|
# Determine build type
|
|
if [[ -f "$dir/default.nix" ]]; then
|
|
build_type="nix"
|
|
elif [[ -f "$dir/Dockerfile" ]]; then
|
|
build_type="dockerfile"
|
|
else
|
|
continue
|
|
fi
|
|
|
|
# Extract container name from directory
|
|
container=$(basename "$dir")
|
|
image="blumeops/$container"
|
|
|
|
echo "[$build_type] $container"
|
|
echo " Image: $REGISTRY/$image"
|
|
echo " Path: $dir"
|
|
|
|
# Query zot for recent tags
|
|
tags=$(curl -sf "https://$REGISTRY/v2/$image/tags/list" 2>/dev/null | jq -r '.tags // [] | .[]' | grep -E '^v[0-9]' | sort -V | tail -4 || true)
|
|
|
|
if [[ -n "$tags" ]]; then
|
|
echo " Recent tags:"
|
|
echo "$tags" | while read -r tag; do
|
|
echo " - $tag"
|
|
done
|
|
else
|
|
echo " Recent tags: (none)"
|
|
fi
|
|
echo ""
|
|
done
|
|
|
|
echo "---"
|
|
echo "To release a new version:"
|
|
echo " mise run container-tag-and-release <container> <version>"
|
|
echo ""
|
|
echo "Example:"
|
|
echo " mise run container-tag-and-release nettest v1.0.0"
|