Skip to content

Commit fac2944

Browse files
committed
Simplify add_event_list
1 parent 8b84ede commit fac2944

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

action.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,9 @@ runs:
7676
7777
add_event_list() {
7878
(
79-
if [ ! -e "$GITHUB_EVENT_NAME/index.html" ]; then
80-
printf "<html><head><title>check-spelling coverage for $GITHUB_EVENT_NAME</title></head>\n<body>\n <h1>check-spelling coverage for $GITHUB_EVENT_NAME</h1>\n <ul>\n </ul>\n</body></html>\n" > "$GITHUB_EVENT_NAME/index.html"
81-
git add "$GITHUB_EVENT_NAME/index.html"
79+
if [ ! -e index.html ]; then
80+
printf "<html><head><title>check-spelling coverage for $GITHUB_EVENT_NAME</title></head>\n<body>\n <h1>check-spelling coverage for $GITHUB_EVENT_NAME</h1>\n <ul>\n </ul>\n</body></html>\n" > index.html
81+
git add index.html
8282
git \
8383
-c user.email="$user_email" \
8484
-c user.name="$user_name" \
@@ -88,9 +88,9 @@ runs:
8888
}
8989
9090
add_event_listing() {
91-
add_event_list
9291
(
9392
cd "$GITHUB_EVENT_NAME"
93+
add_event_list
9494
if ! grep -q "$sha" index.html; then
9595
date="$date" \
9696
perl -pi -e 's#^(\s*)(<ul>)#$1$2\n$1 <li><a href="$ENV{sha}/">$ENV{date} ($ENV{sha})</a></li>#' index.html

0 commit comments

Comments
 (0)