Code Issues Pull Requests Actions Packages Projects Releases 15 Wiki Activity Security Code Quality

Add Gitea badges workflow and scripts for awarding badges based on user activity
Gitea badges / award (push) Failing after 37s
gitea/global-workflow: Scan Vulnerabilities / sbom-upload (push) Failing after 54s

This commit is contained in:
tienbh committed 2026-11-19 09:23:45 +07:00
1 parent c0a1d50c9d
commit 3a5ec76030
5 files changed
+414

No files matched your search

+31
View File
@@ -0,0 +1,31 @@
name: Gitea badges
on:
schedule:
- cron: "30 * * * *" # every hour, minute 30
workflow_dispatch:
inputs:
dry_run:
description: "Chỉ in kế hoạch, không gán/gỡ badge"
type: boolean
default: false
push:
branches: [main]
paths:
- scripts/gitea-badges/**
- .github/workflows/gitea-badges.yaml
jobs:
award:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- name: Award badges
env:
GITEA_URL: ${{ vars.GITEA_URL || github.server_url }}
BADGE_TOKEN: ${{ secrets.BADGE_ADMIN_TOKEN }}
# push -> dry-run để review thay đổi config; schedule -> chạy thật
DRY_RUN: ${{ github.event_name == 'push' && 'true' || github.event.inputs.dry_run || 'false' }}
run: python3 scripts/gitea-badges/award_badges.py --config scripts/gitea-badges/badges.json