Skip to content

DROP AND GIVE ME 20 (#293) #439

DROP AND GIVE ME 20 (#293)

DROP AND GIVE ME 20 (#293) #439

name: "Update Changelog"
on:
push:
branches:
- master
jobs:
update-changelog:
concurrency: changelog
runs-on: ubuntu-latest
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 "::set-output name=ACTIONS_ENABLED::$SECRET_EXISTS"
- name: Set up Python
if: steps.value_holder.outputs.ACTIONS_ENABLED
uses: actions/setup-python@v3
with:
python-version: 3.8
- name: Install dependencies
if: steps.value_holder.outputs.ACTIONS_ENABLED
run: |
python -m pip install --upgrade pip
python -m pip install pyyaml pygithub
sudo apt-get install dos2unix
- name: Checkout
if: steps.value_holder.outputs.ACTIONS_ENABLED
uses: actions/checkout@v3
- name: Fetch Changelog
if: steps.value_holder.outputs.ACTIONS_ENABLED
run: |
python .github/ss13_fetchchangelog.py html/changelogs
env:
REPO: ${{ github.repository }}
- name: Update Changelog
if: steps.value_holder.outputs.ACTIONS_ENABLED
run: |
python .github/ss13_genchangelog.py html/changelogs
- name: Commit
if: steps.value_holder.outputs.ACTIONS_ENABLED
run: |
git pull origin master
git config --local user.email "[email protected]"
git config --local user.name "Changelogs"
git add html/changelogs/archive
git commit -m "Automatic changelog compile [ci skip]" -a || true
- name: "Push"
if: steps.value_holder.outputs.ACTIONS_ENABLED
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}