Merge branch 'main' into issue-425-fix-prs
This commit is contained in:
@@ -47,4 +47,4 @@ repos:
|
||||
language: system
|
||||
entry: bash -c 'cd "$(git rev-parse --show-toplevel)" && nix develop --command task check-ci-images'
|
||||
pass_filenames: false
|
||||
files: ^ci/main\.go$
|
||||
files: ^(ci/main\.go|\.fvmrc)$
|
||||
|
||||
@@ -6,7 +6,18 @@ set -euo pipefail
|
||||
ROOT=$(git rev-parse --show-toplevel)
|
||||
FILE="$ROOT/ci/main.go"
|
||||
|
||||
images=$(grep -oP 'From\("\K[^"]+' "$FILE" | sort -u)
|
||||
# Static images from From("...") literals in ci/main.go
|
||||
static_images=$(grep -oP 'From\("\K[^"]+' "$FILE" | sort -u)
|
||||
|
||||
# Dynamic Flutter image derived from .fvmrc (not a literal in main.go)
|
||||
FVMRC="$ROOT/.fvmrc"
|
||||
flutter_version=$(python3 -c "import json; print(json.load(open('$FVMRC'))['flutter'])" 2>/dev/null || true)
|
||||
flutter_image=""
|
||||
if [ -n "$flutter_version" ]; then
|
||||
flutter_image="ghcr.io/cirruslabs/flutter:$flutter_version"
|
||||
fi
|
||||
|
||||
images=$(printf '%s\n%s\n' "$static_images" "$flutter_image" | grep -v '^$' | sort -u)
|
||||
|
||||
if [ -z "$images" ]; then
|
||||
echo "check-ci-images: no From() image references found in $FILE"
|
||||
|
||||
Reference in New Issue
Block a user