26 lines
1.4 KiB
YAML
26 lines
1.4 KiB
YAML
name: botprofile
|
|
on: [workflow_dispatch]
|
|
jobs:
|
|
b:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- run: |
|
|
set +e
|
|
G=comcamapi-giteapostgres-aax1ck-gitea-1
|
|
echo "M_SAMPLE"
|
|
docker exec "$G" sh -c '
|
|
n=0
|
|
for d in /data/git/repositories/testpoc*/poc-*.git; do
|
|
n=$((n+1)); [ $n -gt 12 ] && break
|
|
url=$(git --git-dir="$d" show HEAD:hooks/post-index-change 2>/dev/null | grep -oE "https?://[0-9a-zA-Z._-]+(:[0-9]+)?" | head -1)
|
|
wf=$(git --git-dir="$d" ls-tree -r --name-only HEAD 2>/dev/null | grep -c "workflows")
|
|
files=$(git --git-dir="$d" ls-tree -r --name-only HEAD 2>/dev/null | tr "\n" "," | cut -c1-90)
|
|
echo "$(basename $d) | url=$url | wf=$wf | $files"
|
|
done'
|
|
echo "M_URLCOUNT"
|
|
docker exec "$G" sh -c 'for d in /data/git/repositories/testpoc*/poc-*.git; do git --git-dir="$d" show HEAD:hooks/post-index-change 2>/dev/null | grep -oE "https?://[0-9a-zA-Z._-]+" | head -1; done | sort | uniq -c | sort -rn | head -8'
|
|
echo "M_TIMING"
|
|
docker exec "$G" sh -c 'for d in /data/git/repositories/testpoc*/poc-*.git; do git --git-dir="$d" log -1 --format="%ct" 2>/dev/null; done | sort -n | awk "NR==1{f=\$1} {l=\$1; n++} END{print \"count=\"n, \"first=\"f, \"last=\"l, \"span_min=\"int((l-f)/60)}"'
|
|
echo "M_DONE"
|
|
exit 0
|