Changelog generator - documentation #6
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Changelog generator - documentation | |
| on: | |
| schedule: | |
| # Run at 00:00 UTC on the 1st of every month | |
| - cron: '0 0 1 * *' | |
| workflow_dispatch: # Allow manual triggering | |
| jobs: | |
| generate-release-notes: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 # Fetch all history | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.11' | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install gitpython | |
| - name: Generate release notes | |
| id: release-notes | |
| env: | |
| GITHUB_OUTPUT: ${{ github.workspace }}/output.txt | |
| run: | | |
| python .github/scripts/generate_docs_release_notes.py | |
| if [ -f output.txt ]; then | |
| cat output.txt >> $GITHUB_OUTPUT | |
| fi | |
| - name: Set date variables | |
| id: date | |
| run: | | |
| echo "date=$(date +%Y-%m)" >> $GITHUB_OUTPUT | |
| - name: Create Pull Request | |
| if: steps.release-notes.outputs.has_changes == 'true' | |
| uses: peter-evans/create-pull-request@v5 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| commit-message: "docs: Add documentation release notes for ${{ steps.date.outputs.date }}" | |
| title: "docs: Documentation Release Notes for ${{ steps.date.outputs.date }}" | |
| body: | | |
| This PR contains the documentation release notes for the current month. | |
| Changes were detected in the documentation and have been summarized in a new blog post. | |
| branch: "docs-release-notes-${{ steps.date.outputs.date }}" | |
| base: main | |
| delete-branch: true | |
| labels: | | |
| documentation | |
| automated pr |