Skip to content

Commit 9f53c7f

Browse files
committed
github-actionify.sh: make badge logic smarter
1 parent 352a9e9 commit 9f53c7f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

github-actionify.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,9 @@ EOL
264264
info "Updating README.md GitHub Action badge"
265265
sed "s;travis-ci.*;$domain/$repoSlug/actions/$ciSlugBuildMain/badge.svg)](https://$domain/$repoSlug/actions/$ciSlugBuildMain);g" README.md >"$tmpFile"
266266
update README.md 'update README.md badge link'
267+
elif grep -qF "$domain/$repoSlug/actions/$ciSlugBuildMain/badge.svg" README.md >/dev/null 2>&1
268+
then
269+
info "GitHub Action badge already present in README.md"
267270
else
268271
info "Adding GitHub Action badge to README.md"
269272
echo "[![](https://$domain/$repoSlug/actions/$ciSlugBuildMain/badge.svg)](https://$domain/$repoSlug/actions/$ciSlugBuildMain)" >"$tmpFile"

0 commit comments

Comments
 (0)