Skip to content

Compile changelogs

Compile changelogs #51

name: Compile changelogs
permissions:
contents: read
on:
schedule:
- cron: "0 15 * * *"
workflow_dispatch: # allows this workflow to be manually triggered
jobs:
CompileCL:
permissions:
contents: write # required to push the updated changelog commit
runs-on: ubuntu-20.04
if: github.repository == 'Foundation-19/Foundation-19' # to prevent this running on forks
steps:
- name: Python setup
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Install depends
run: |
python -m pip install --upgrade pip
python -m pip install pyyaml
sudo apt-get install dos2unix
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0 # Otherwise, we will fail to push refs
ref: dev
token: ${{ secrets.BOT_TOKEN }}
- name: Compile CL
run: |
python tools/changelog/ss13_genchangelog.py html/changelogs
- name: Commit And Push
run: |
git config --global user.email "${{ secrets.BOT_EMAIL }}"
git config --global user.name "${{ secrets.BOT_USERNAME }}"
git diff --quiet --exit-code && echo "No changes found, abort." && exit 0
git pull origin dev
git add html/changelogs
git commit -m "Automatic changelog compile" -a
git push