Skip to content

Add GitHub Actions workflow to notify bluefin-docs on release publication with testing support - #2880

Merged
castrojo merged 4 commits into
mainfrom
copilot/fix-149ca821-f514-45bb-8734-3e4372556d50
Jul 31, 2025
Merged

Add GitHub Actions workflow to notify bluefin-docs on release publication with testing support#2880
castrojo merged 4 commits into
mainfrom
copilot/fix-149ca821-f514-45bb-8734-3e4372556d50

Conversation

Copilot AI commented Jul 31, 2025

Copy link
Copy Markdown
Contributor

This PR adds a new GitHub Actions workflow that automatically notifies the ublue-os/bluefin-docs repository 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.yml that:

  • Triggers automatically on every published release using on: release: types: [published]
  • Supports manual testing via workflow_dispatch trigger with configurable test inputs
  • Uses organization-wide authentication via the ORG_GITHUB_TOKEN secret
  • Sends repository_dispatch event with type bluefin-release to ublue-os/bluefin-docs
  • Includes comprehensive release metadata in the client payload for future extensibility

Testing Features

The workflow can be tested without creating actual releases by:

  1. Going to Actions → "Notify Docs on Release" workflow
  2. Clicking "Run workflow"
  3. Configuring test parameters (tag name, release name, body, prerelease flag)
  4. The payload includes a test_mode: true flag to distinguish test runs

Implementation Details

The workflow uses the proven peter-evans/repository-dispatch@v3 action (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.

Create a GitHub Actions workflow in ublue-os/bluefin that triggers on every published release (stable and GTS) and uses an organization-wide token to send a repository_dispatch event with type 'bluefin-release' to ublue-os/bluefin-docs. This will ensure the docs repo always syncs the latest release information from Bluefin. The workflow should:

  1. Trigger on every release published to bluefin (including stable and GTS tags).
  2. Use an org-wide secret for authentication (e.g., ORG_GITHUB_TOKEN).
  3. Dispatch the event to ublue-os/bluefin-docs with event_type: bluefin-release.
  4. Include relevant release details in the client_payload if needed for future extensibility.

💡 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.

Co-authored-by: castrojo <1264109+castrojo@users.noreply.github.com>
Copilot AI changed the title [WIP] Add workflow to dispatch bluefin-release event to docs on every release Add GitHub Actions workflow to notify bluefin-docs on release publication Jul 31, 2025
Copilot AI requested a review from castrojo July 31, 2025 01:22
Comment thread .github/workflows/notify-docs-release.yml Fixed
@castrojo

Copy link
Copy Markdown
Collaborator

Do you have a way to test this without making a real bluefin release?

Co-authored-by: castrojo <1264109+castrojo@users.noreply.github.com>

Copilot AI commented Jul 31, 2025

Copy link
Copy Markdown
Contributor Author

Do you have a way to test this without making a real bluefin release?

Yes! I've added a workflow_dispatch trigger that allows manual testing without creating actual releases. You can now test the workflow from the GitHub Actions tab by:

  1. Go to Actions → "Notify Docs on Release" workflow
  2. Click "Run workflow"
  3. Fill in test values (tag name, release name, body, prerelease flag)
  4. The workflow will send the same repository_dispatch event but with a test_mode: true flag

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

Copilot AI changed the title Add GitHub Actions workflow to notify bluefin-docs on release publication Add GitHub Actions workflow to notify bluefin-docs on release publication with testing support Jul 31, 2025
@castrojo
castrojo marked this pull request as ready for review July 31, 2025 01:38
Copilot AI review requested due to automatic review settings July 31, 2025 01:38
@castrojo
castrojo merged commit ae9af44 into main Jul 31, 2025
26 of 29 checks passed
@dosubot dosubot Bot added the size/M This PR changes 30-99 lines, ignoring generated files. label Jul 31, 2025
@castrojo
castrojo deleted the copilot/fix-149ca821-f514-45bb-8734-3e4372556d50 branch July 31, 2025 01:38

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 }}",

Copilot AI Jul 31, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
"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 }}",

Copilot uses AI. Check for mistakes.
"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 }}"

Copilot AI Jul 31, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
"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 }}"

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/M This PR changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants