Files
CHOMPStation2/.github/workflows/compile_changelogs.yml
dependabot[bot] a934280e67 Bump actions/checkout from 5 to 6 (#12010)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-11-20 20:45:47 +01:00

72 lines
2.3 KiB
YAML

name: Compile changelogs
on:
schedule:
- cron: "0 0 * * *"
workflow_dispatch:
jobs:
compile:
name: "Compile changelogs"
runs-on: ubuntu-24.04
steps:
#- name: "Check for ACTION_ENABLER secret and pass true to output if it exists to be checked by later steps"
# id: value_holder
# env:
# ENABLER_SECRET: ${{ secrets.ACTION_ENABLER }}
# run: |
# unset SECRET_EXISTS
# if [ -n "$ENABLER_SECRET" ]; then SECRET_EXISTS=true ; fi
# echo "ACTIONS_ENABLED=$SECRET_EXISTS" >> $GITHUB_OUTPUT
- name: "Setup python"
#if: steps.value_holder.outputs.ACTIONS_ENABLED
uses: actions/setup-python@v6
with:
python-version: "3.x"
- name: "Install deps"
#if: steps.value_holder.outputs.ACTIONS_ENABLED
run: |
python -m pip install --upgrade pip
python -m pip install pyyaml
sudo apt-get install dos2unix
- name: "Checkout"
#if: steps.value_holder.outputs.ACTIONS_ENABLED
uses: actions/checkout@v6
with:
fetch-depth: 25
persist-credentials: false
- name: "Compile"
#if: steps.value_holder.outputs.ACTIONS_ENABLED
run: |
python tools/ss13_genchangelog.py html/changelogs_ch
- name: Commit
#if: steps.value_holder.outputs.ACTIONS_ENABLED
run: |
git config --local user.name "chompstation-ci[bot]"
git config --local user.email "12787406+chompstation-ci[bot]@users.noreply.github.com"
git pull origin master
git add html/changelogs_ch
git commit -m "Automatic changelog compile [ci skip]" -a || true
- name: Generate App Token
id: app-token-generation
uses: actions/create-github-app-token@v2
if: env.APP_PRIVATE_KEY != '' && env.APP_ID != ''
with:
app-id: ${{ secrets.APP_ID }}
private-key: ${{ secrets.APP_PRIVATE_KEY }}
env:
APP_PRIVATE_KEY: ${{ secrets.APP_PRIVATE_KEY }}
APP_ID: ${{ secrets.APP_ID }}
- name: "Push"
#if: steps.value_holder.outputs.ACTIONS_ENABLED
uses: ad-m/github-push-action@master
with:
github_token: ${{ steps.app-token-generation.outputs.token || secrets.GITHUB_TOKEN }}