Skip to content

Commit

Permalink
check name for pattern
Browse files Browse the repository at this point in the history
  • Loading branch information
yegor256 committed May 27, 2024
1 parent 28a5632 commit d78c11b
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions entry.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,15 @@ if [ -z "${GITHUB_WORKSPACE}" ]; then
exit 1
fi

name=$(basename "${INPUT_FACTBASE}")
name=${name%.*}
if [[ ! "${name}" =~ ^[a-z][a-z0-9-]{1,23}$ ]]; then
echo "The base name of the factbase file (${name}) doesn't match the expected pattern."
echo "It must only include low-case English letters and numbers,"
echo "may start only with a letter, and may not be longer than 24 characters."
exit 1
fi

export GLI_DEBUG=true

cd "${GITHUB_WORKSPACE-/w}"
Expand Down

0 comments on commit d78c11b

Please sign in to comment.