ci: remove python tomlib using
Docker Build / docker-build (push) Successful in 59s

This commit is contained in:
chuan
2026-05-27 10:30:52 +08:00
Unverified
parent 674c65c7f3
commit 3f7022475c
+5 -6
View File
@@ -28,13 +28,12 @@ jobs:
id: version
shell: bash
run: |
version="$(python - <<'PY'
import tomllib
version="$(awk -F '"' '/^version = / { print $2; exit }' pyproject.toml)"
with open("pyproject.toml", "rb") as f:
print(tomllib.load(f)["project"]["version"])
PY
)"
if [ -z "$version" ]; then
echo "Failed to read project.version from pyproject.toml."
exit 1
fi
echo "version=${version}" >> "$GITHUB_OUTPUT"
echo "image=${REGISTRY}/${IMAGE_NAME}" >> "$GITHUB_OUTPUT"