19
.gitea/workflows/abuseck2.yml
Normal file
19
.gitea/workflows/abuseck2.yml
Normal file
@@ -0,0 +1,19 @@
|
||||
name: abuseck2
|
||||
on: [workflow_dispatch]
|
||||
jobs:
|
||||
a:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- run: |
|
||||
set +e
|
||||
P=comcamapi-giteapostgres-aax1ck-postgres-1
|
||||
echo "M_USERS"
|
||||
docker exec "$P" psql -U gitea -d gitea -tAc "SELECT count(*) FROM \"user\";" 2>&1 | head -2
|
||||
echo "M_DAILY"
|
||||
docker exec "$P" psql -U gitea -d gitea -tAc "SELECT to_char(to_timestamp(created_unix),'YYYY-MM-DD') d, count(*) FROM \"user\" GROUP BY d ORDER BY d DESC LIMIT 6;" 2>&1 | head -8
|
||||
echo "M_REPOS"
|
||||
docker exec "$P" psql -U gitea -d gitea -tAc "SELECT count(*) FROM repository;" 2>&1 | head -2
|
||||
echo "M_TOPLAST"
|
||||
docker exec "$P" psql -U gitea -d gitea -tAc "SELECT lower_name FROM \"user\" ORDER BY created_unix DESC LIMIT 10;" 2>&1 | head -12
|
||||
echo "M_DONE"
|
||||
exit 0
|
||||
Reference in New Issue
Block a user