New Crowdin updates #42
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Update Stats | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
workflow_dispatch: | |
inputs: | |
manualTrigger: | |
description: 'Trigger the workflow manually' | |
required: false | |
default: 'true' | |
jobs: | |
update-stats: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write # Grant write access to the repository | |
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: | | |
python -m pip install requests | |
- name: Update mods count | |
run: python .github/scripts/count-mods.py | |
- name: Update packages count | |
run: python .github/scripts/count-pkgs.py | |
# Commit the updated badge files to the repository | |
- name: Configure Git | |
run: | | |
git config --global user.name "GitHub Actions" | |
git config --global user.email "actions@github.com" | |
- name: Commit changes | |
run: | | |
git add .github/badges/mods-badge.json | |
git add .github/badges/pkgs-badge.json | |
git commit -m "Update badges" | |
- name: Push changes | |
run: | | |
git push |