3 Commits

Author SHA1 Message Date
Peter Evans
f2b0643b95 Update workflow 2020-08-22 09:52:30 +09:00
Peter Evans
a6985f583c Update action version 2020-08-22 09:51:01 +09:00
Peter Evans
b6bd2fd8c2 Check the readme file exists 2020-08-22 09:46:01 +09:00
3 changed files with 8 additions and 1 deletions

View File

@@ -1,5 +1,6 @@
name: Update Docker Hub Description
on:
workflow_dispatch:
push:
branches:
- master

View File

@@ -16,7 +16,7 @@ description: 'An action to update a Docker Hub repository description from READM
# default: ./README.md
runs:
using: 'docker'
image: 'docker://peterevans/dockerhub-description:2.3.0'
image: 'docker://peterevans/dockerhub-description:2.3.1'
branding:
icon: 'upload'
color: 'blue'

View File

@@ -25,6 +25,12 @@ fi
# Set the default path to 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
if [ $(wc -c <${README_FILEPATH}) -gt 25000 ]; then
echo "File size exceeds the maximum allowed 25000 bytes"