Release notes sync #12
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: "Release notes sync" | |
| on: | |
| workflow_dispatch: | |
| schedule: | |
| - cron: "0 6 * * 1" | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| jobs: | |
| sync-release-notes: | |
| name: "Sync release notes" | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| steps: | |
| - name: "Checkout code" | |
| uses: actions/checkout@v4 | |
| - name: "Update release notes data" | |
| uses: ./.github/actions/release-notes | |
| env: | |
| JIRA_TOKEN: "${{ secrets.JIRA_TOKEN }}" | |
| JIRA_BASE_URL: "${{ secrets.JIRA_URL }}/rest/api/2" | |
| - name: "Detect release notes changes" | |
| id: changes | |
| shell: bash | |
| run: | | |
| if git diff --quiet -- docs/_data/release-notes.json; then | |
| echo "has_changes=false" >> "$GITHUB_OUTPUT" | |
| else | |
| echo "has_changes=true" >> "$GITHUB_OUTPUT" | |
| fi | |
| - name: "Create pull request" | |
| if: steps.changes.outputs.has_changes == 'true' | |
| uses: peter-evans/create-pull-request@5f6978faf089d4d20b00c7766989d076bb2fc7f1 # v8.1.1 | |
| with: | |
| token: "${{ secrets.GITHUB_TOKEN }}" | |
| branch: "automation/release-notes-cache" | |
| delete-branch: true | |
| commit-message: "sync release notes" | |
| title: "CCM-18043: Sync release notes" | |
| body: | | |
| ## Summary | |
| This PR syncs the release notes generated from JIRA for the last year. | |
| - Trigger: `${{ github.event_name }}` | |
| - Source: `JIRA_URL secret (expanded to REST API base path)` | |
| add-paths: | | |
| docs/_data/release-notes.json |