Компилирование Чейнджлогов #76
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/[email protected] | |
with: | |
fetch-depth: 0 # Otherwise, we will fail to push refs | |
ref: master | |
- name: Настройка Python | |
uses: actions/[email protected] | |
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 |