GRM-45: feat: add self-updating quality badges to README
This commit is contained in:
@@ -177,3 +177,28 @@ jobs:
|
||||
JOB_NAME: ${{ github.job }}
|
||||
MATRIX_INDEX: ${{ matrix.runner-index }}
|
||||
GITEA_REPOSITORY: ${{ github.repository }}
|
||||
|
||||
badges:
|
||||
needs: [quality]
|
||||
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
|
||||
runs-on: docker
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Set up environment
|
||||
run: make setup
|
||||
- name: Generate badge JSON files
|
||||
run: |
|
||||
. .venv/bin/activate
|
||||
python3 scripts/generate_badges.py --output-dir .badges/
|
||||
- name: Push badges to badges branch
|
||||
run: |
|
||||
git config user.name "gitea-actions-bot"
|
||||
git config user.email "actions@oblachno.fyi"
|
||||
git checkout --orphan badges
|
||||
git rm -rf .
|
||||
cp -r .badges/* .
|
||||
git add *.json
|
||||
git commit -m "Update badges [skip ci]"
|
||||
git push origin badges --force
|
||||
|
||||
Reference in New Issue
Block a user