Add GitHub Actions workflow to notify bluefin-docs on release publication with testing support - #2880
Conversation
Co-authored-by: castrojo <1264109+castrojo@users.noreply.github.com>
|
Do you have a way to test this without making a real bluefin release? |
Co-authored-by: castrojo <1264109+castrojo@users.noreply.github.com>
Yes! I've added a
This maintains full compatibility with real releases while enabling safe testing. The test payload includes all the same fields as a real release event. Commit: 9620e84 |
There was a problem hiding this comment.
Pull Request Overview
This PR adds a GitHub Actions workflow to automatically notify the bluefin-docs repository whenever a new release is published to the bluefin repository, with built-in testing capabilities through manual workflow dispatch.
- Implements automated release notifications via repository dispatch events
- Provides comprehensive testing support through workflow_dispatch with configurable parameters
- Uses organization-wide token authentication for cross-repository communication
| "html_url": "${{ github.event_name == 'workflow_dispatch' && format('https://github.com/{0}/releases/tag/{1}', github.repository, inputs.tag_name) || github.event.release.html_url }}", | ||
| "prerelease": ${{ github.event_name == 'workflow_dispatch' && inputs.prerelease || github.event.release.prerelease }}, | ||
| "draft": ${{ github.event_name == 'workflow_dispatch' && false || github.event.release.draft }}, | ||
| "created_at": "${{ github.event_name == 'workflow_dispatch' && '' || github.event.release.created_at }}", |
There was a problem hiding this comment.
The empty string fallback for 'created_at' in test mode could cause issues for consumers expecting a valid timestamp. Consider using the current timestamp with github.run_id or a consistent test timestamp instead of an empty string.
| "created_at": "${{ github.event_name == 'workflow_dispatch' && '' || github.event.release.created_at }}", | |
| "created_at": "${{ github.event_name == 'workflow_dispatch' && format('{0}T{1}Z', github.event.date, github.run_id) || github.event.release.created_at }}", |
| "prerelease": ${{ github.event_name == 'workflow_dispatch' && inputs.prerelease || github.event.release.prerelease }}, | ||
| "draft": ${{ github.event_name == 'workflow_dispatch' && false || github.event.release.draft }}, | ||
| "created_at": "${{ github.event_name == 'workflow_dispatch' && '' || github.event.release.created_at }}", | ||
| "published_at": "${{ github.event_name == 'workflow_dispatch' && '' || github.event.release.published_at }}" |
There was a problem hiding this comment.
The empty string fallback for 'published_at' in test mode could cause issues for consumers expecting a valid timestamp. Consider using the current timestamp with github.run_id or a consistent test timestamp instead of an empty string.
| "published_at": "${{ github.event_name == 'workflow_dispatch' && '' || github.event.release.published_at }}" | |
| "published_at": "${{ github.event_name == 'workflow_dispatch' && format('{0}Z', github.event.workflow_run.created_at || github.run_id) || github.event.release.published_at }}" |
This PR adds a new GitHub Actions workflow that automatically notifies the
ublue-os/bluefin-docsrepository whenever a new release is published to the bluefin repository, with built-in testing capabilities.Problem
The bluefin-docs repository needs to stay synchronized with the latest release information from bluefin, but there was no automated mechanism to trigger updates when new releases (stable or GTS) are published.
Solution
Added
.github/workflows/notify-docs-release.ymlthat:on: release: types: [published]workflow_dispatchtrigger with configurable test inputsORG_GITHUB_TOKENsecretbluefin-releasetoublue-os/bluefin-docsTesting Features
The workflow can be tested without creating actual releases by:
test_mode: trueflag to distinguish test runsImplementation Details
The workflow uses the proven
peter-evans/repository-dispatch@v3action (with pinned commit hash for security) and follows the same patterns as existing workflows in the repository. The client payload structure allows the docs repository to access all relevant release information for processing.This ensures that whenever bluefin publishes a new stable or GTS release, the docs repository will automatically receive a notification and can update accordingly, while providing a safe way to test the integration.
This pull request was created as a result of the following prompt from Copilot chat.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.