name: Calens Changelog
# This workflow is triggered on pushes to the repository.
on:
  push:
    branches:
    - feature/*
    - fix/*
    - improvement/*
    - release/*
    - technical/*

permissions:
  contents: read

jobs:
  build:
    permissions:
      contents: write
    runs-on: ubuntu-22.04
    name: Generate Calens Changelog
    steps:
      - name: Checkout
        uses: actions/checkout@v4
        with:
          persist-credentials: false
      - name: Run Calens
        uses: actionhippie/calens@v1
        with:
          target: CHANGELOG.md
      - name: Commit files
        uses: GuillaumeFalourd/git-commit-push@v1.3
        with:
          email: devops@owncloud.com
          name: ownClouders
          commit_message: "docs: calens changelog updated"
          access_token: ${{ secrets.GH_PAT }}
