All checks were successful
Test CI / test (pull_request) Successful in 3s
- Workflows trigger on git tags (e.g. runner-v1.0.0, devpi-v1.0.0) - Composite action takes explicit version, tags image with version + SHA - Add mise-tasks/container-list to enumerate containers and recent tags - Add mise-tasks/container-release to create release tags - Update CLAUDE.md with container release commands - TODO: investigate zot tag immutability Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
53 lines
1.5 KiB
Bash
Executable file
53 lines
1.5 KiB
Bash
Executable file
#!/usr/bin/env bash
|
|
#MISE description="List available containers and their recent tags"
|
|
|
|
set -euo pipefail
|
|
|
|
REGISTRY="registry.tail8d86e.ts.net"
|
|
WORKFLOW_DIR=".forgejo/workflows"
|
|
|
|
echo "Container Images"
|
|
echo "================"
|
|
echo ""
|
|
|
|
# Find all build-*.yaml workflows
|
|
for workflow in "$WORKFLOW_DIR"/build-*.yaml; do
|
|
[[ -f "$workflow" ]] || continue
|
|
|
|
# Extract container name from filename: build-runner.yaml -> runner
|
|
filename=$(basename "$workflow")
|
|
container="${filename#build-}"
|
|
container="${container%.yaml}"
|
|
|
|
# Skip if not a container build workflow (check for image_name)
|
|
if ! grep -q "image_name:" "$workflow" 2>/dev/null; then
|
|
continue
|
|
fi
|
|
|
|
# Extract image name from workflow
|
|
image=$(grep -E "^\s+image_name:" "$workflow" | head -1 | awk '{print $2}')
|
|
|
|
echo "📦 $container"
|
|
echo " Image: $REGISTRY/$image"
|
|
echo " Workflow: $workflow"
|
|
|
|
# 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-release <container> <version>"
|
|
echo ""
|
|
echo "Example:"
|
|
echo " mise run container-release runner v1.0.0"
|