Чейнджлог: YML -> HTML #320
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: "Чейнджлог: YML -> HTML" | |
permissions: | |
contents: read | |
on: | |
schedule: | |
- cron: "0 0 * * *" | |
workflow_dispatch: # allows this workflow to be manually triggered | |
jobs: | |
CompileCL: | |
permissions: | |
contents: write # required to push the updated changelog commit | |
runs-on: ubuntu-latest | |
if: github.repository == 'SierraBay/SierraBay12' # to prevent this running on forks | |
steps: | |
- name: Checkout | |
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab | |
with: | |
fetch-depth: 0 # Otherwise, we will fail to push refs | |
ref: dev220 | |
token: ${{ secrets.BOT_TOKEN }} | |
- name: Установка Python | |
uses: actions/setup-python@61a6322f88396a6271a6ee3565807d608ecaddd1 | |
with: | |
python-version: '3.x' | |
- name: Установка зависимостей | |
run: | | |
python -m pip install --upgrade pip | |
pip install pyyaml bs4 | |
- name: Компиляция чейнджлогов | |
run: | | |
python tools/changelog/sierra_genchangelog.py html/changelog.html html/changelogs | |
- name: Commit и Push | |
run: | | |
git config --global user.email "${{ secrets.BOT_EMAIL }}" | |
git config --global user.name "${{ secrets.BOT_NAME }}" | |
git diff --quiet --exit-code && echo "No changes found, abort." && exit 0 | |
git commit -m "Автоматическая компиляция чейнджлогов [ci skip]" -a | |
git push |