-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (47 loc) · 1.29 KB
/
update_foops_badge.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
name: Update FOOPS Score Badge
on:
workflow_run:
workflows: ["docs"]
types:
- completed
env:
GIT_USER_NAME: BattINFO Developers
GIT_USER_EMAIL: "BattINFO@big-map.org"
jobs:
update-badge:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Install dependencies
run: pip install requests
- name: Fetch FOOPS score and update badge
run: |
python docs/scripts/generate_foops_badge.py
- name: Configure Git
run: |
git config --local user.email "BattINFO@big-map.org"
git config --local user.name "BattINFO Developers"
- name: Check for changes in README.md
run: |
git add README.md
git status
git diff --staged
- name: Commit changes
run: |
git add README.md
git commit -m "Update FOOPS score badge" || echo "No changes to commit"
- name: Push changes
run: git push origin HEAD:main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Push changes
run: git push origin HEAD:main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}