Skip to content

Commit 9c1bd8f

Browse files
committed
CI/CD - retry screenshot if image size is too small
1 parent 55a378f commit 9c1bd8f

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

.github/workflows/screenshot.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,12 @@ anAppPid=$!
99

1010
rm -f "$anImg"
1111
scrot -d $aDelay -F "$anImg"
12+
13+
anImgSize=$(wc -c <"$anImg")
14+
if [ $actualsize -lt 10000 ]; then
15+
# retry one more time
16+
mv -f "$anImg" "back-first-${anImg}"
17+
scrot -d 1 -F "$anImg"
18+
fi
19+
1220
kill $anAppPid

0 commit comments

Comments
 (0)