Skip to content

Commit 83eff03

Browse files
committed
ci: auto-update kata statistics on pr (#767)
1 parent cca5b08 commit 83eff03

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

.github/workflows/kata-pr-init.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,14 @@ jobs:
5858
echo "- [$title]($(basename "$d") \"$id\")"
5959
done > "$base_dir/index.md"
6060
61+
- name: Update statistics
62+
run: |
63+
STATS="|"
64+
for rank in ./kata/*; do
65+
STATS+=" $(find $rank -mindepth 1 -maxdepth 1 -not -empty -type d | wc -l) |"
66+
done
67+
sed -i "28s/.*/$STATS/" ./docs/README.md
68+
6169
- name: Commit changes
6270
id: git
6371
env:

.github/workflows/sync-progress.yml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,6 @@ jobs:
2727
run: |
2828
sed -i -r "s/(completed%20kata-).*(%25-red.svg)/\1$PERCENT\2/g" ./docs/README.md
2929
30-
- name: Update statistics
31-
run: |
32-
STATS="|"
33-
for rank in ./kata/*; do
34-
STATS+=" $(find $rank -mindepth 1 -maxdepth 1 -not -empty -type d | wc -l) |"
35-
done
36-
sed -i "28s/.*/$STATS/" ./docs/README.md
37-
3830
- name: Commit changes
3931
run: |
4032
git add -A

0 commit comments

Comments
 (0)