mirror of
https://github.com/peter-evans/dockerhub-description.git
synced 2024-11-24 21:19:33 +01:00
Check the readme file exists
This commit is contained in:
parent
b5167ca4ba
commit
b6bd2fd8c2
1 changed files with 6 additions and 0 deletions
|
@ -25,6 +25,12 @@ fi
|
||||||
# Set the default path to README.md
|
# Set the default path to README.md
|
||||||
README_FILEPATH=${README_FILEPATH:="./README.md"}
|
README_FILEPATH=${README_FILEPATH:="./README.md"}
|
||||||
|
|
||||||
|
# Check the file exists
|
||||||
|
if [ ! -f ${README_FILEPATH} ]; then
|
||||||
|
echo "Readme file not found"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
# Check the file size
|
# Check the file size
|
||||||
if [ $(wc -c <${README_FILEPATH}) -gt 25000 ]; then
|
if [ $(wc -c <${README_FILEPATH}) -gt 25000 ]; then
|
||||||
echo "File size exceeds the maximum allowed 25000 bytes"
|
echo "File size exceeds the maximum allowed 25000 bytes"
|
||||||
|
|
Loading…
Reference in a new issue