fix: validate deploy version input
All checks were successful
CI / test (pull_request) Successful in 9m11s
CI / deploy (pull_request) Has been skipped

This commit is contained in:
2026-09-15 17:59:23 +03:00
parent 8102556862
commit 144e62a35e
6 changed files with 13 additions and 7 deletions

View File

@@ -42,7 +42,9 @@ jobs:
run: |
set -euo pipefail
backend_version="$(sed -n 's/^BACKEND_VERSION = "\(.*\)"$/\1/p' app/version.py)"
test -n "$backend_version"
case "$backend_version" in
''|*[!0-9.]*) exit 1 ;;
esac
echo "backend_version=$backend_version" >> "$GITHUB_OUTPUT"
tar --exclude=.git --exclude=.env -cf "$RUNNER_TEMP/$RELEASE_NAME" .
printf '%s\n' "$PROD_SSH_KEY" > "$RUNNER_TEMP/deploy_key"