Компилирование Чейнджлогов #778
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: Компилирование Чейнджлогов | |
on: | |
schedule: | |
- cron: "0 0 * * *" | |
workflow_dispatch: | |
jobs: | |
CompileCL: | |
runs-on: ubuntu-latest | |
if: github.repository == 'infinitystation/Baystation12' # to prevent this running on forks | |
steps: | |
- name: Загрузка локальной среды | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 # Otherwise, we will fail to push refs | |
ref: master | |
- name: Настройка Python | |
uses: actions/setup-python@v3 | |
with: | |
python-version: '3.x' | |
- name: Установка зависимостей | |
run: | | |
python -m pip install --upgrade pip | |
pip install pyyaml bs4 | |
- name: Генерирование ЧЛ | |
run: | | |
python tools/changelog/ss13_ru_genchangelog.py html/changelog_infinity.html html/changelogs_infinity | |
- name: Коммит и Пуш | |
run: | | |
git config --global user.email "${{ secrets.BOT_EMAIL }}" | |
git config --global user.name "${{ secrets.BOT_NAME }}" | |
git diff --quiet --exit-code && echo "Изменения не обнаружены, отмена" && exit 0 | |
git commit -m "Автоматическая генерация чейнджлогов" -a | |
git push |