name: Changelog Generator

on:
  push:
    branches:
      - master
    tags:
      - '*'

jobs:
  changelog:
    name: Changelog Generator
    runs-on: ubuntu-20.04
    timeout-minutes: 10

    steps:
      - uses: actions/checkout@v3

      - run: echo "${HOME}/.local/bin" >> ${GITHUB_PATH}
      - run: python3 -m pip install --user --requirement=ci/requirements.txt

      - name: Get config
        id: config
        run: echo ::set-output name=config::$(python -c 'print(__import__("json").dumps(__import__("yaml").load(open(".github/changelog-config.yaml"))))')

      - name: Generate changelog
        id: changelog
        uses: heinrichreimer/github-changelog-generator-action@v2.3
        with:
          token: ${{ secrets.GITHUB_TOKEN }}
          configureSections: ${{ steps.config.outputs.config }}
          cacheFile: github-changelog-generator-action.cache

      - run: c2cciutils-checks --fix --check=prettier
      - run: git add CHANGELOG.md
      - run: git config --global user.email "ci@example.com"
      - run: git config --global user.name "CI"
      - run: git commit -m "Update the changelog"
      - run: git checkout -b changelog-update
      - run: git push origin changelog-update -f
      - run: gh pr create --base=master --fill --label=chore || true
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

name: Changelog Generator

on:
  push:
    branches:
      - master
    tags:
      - '*'

jobs:
  changelog:
    name: Changelog Generator
    runs-on: ubuntu-20.04
    timeout-minutes: 10

    steps:
      - uses: actions/checkout@v3

      - run: echo "${HOME}/.local/bin" >> ${GITHUB_PATH}
      - run: python3 -m pip install --user --requirement=ci/requirements.txt

      - name: Get config
        id: config
        run: echo ::set-output name=config::$(python -c 'print(__import__("json").dumps(__import__("yaml").load(open(".github/changelog-config.yaml"))))')

      - name: Generate changelog
        id: changelog
        uses: heinrichreimer/github-changelog-generator-action@v2.3
        with:
          token: ${{ secrets.GITHUB_TOKEN }}
          configureSections: ${{ steps.config.outputs.config }}
          cacheFile: github-changelog-generator.cache
          sinceTag: 3.20.0

      - run: c2cciutils-checks --fix --check=prettier
      - run: git add CHANGELOG.md github-changelog-generator.cache
      - run: git config --global user.email "ci@example.com"
      - run: git config --global user.name "CI"
      - run: git commit -m "Update the changelog"
      - run: git checkout -b changelog-update
      - run: git push origin changelog-update -f
      - run: gh pr create --base=master --fill --label=chore || true
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Add a cache and a since
Add a cache and a since
