Skip to content

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented Sep 5, 2025

The alpha release workflow was failing at the final step when trying to trigger the stage-2 build workflow with the error:

could not create workflow dispatch event: HTTP 403: Resource not accessible by integration

This occurred because the workflow was using the default github.token instead of the privileged secrets.GH_TOKEN to trigger another workflow. GitHub requires elevated permissions to trigger workflows from other workflows for security reasons.

Root Cause

In .github/workflows/release-stage-1_update_dependencies.yml, the "Trigger Build and Release" step was configured with:

env:
  GH_TOKEN: ${{ github.token }}  # Insufficient permissions

The default github.token lacks the necessary permissions to dispatch other workflows, resulting in HTTP 403 errors.

Fix

Changed the token reference to use the privileged token that's already configured elsewhere in the same workflow:

- GH_TOKEN: ${{ github.token }}
+ GH_TOKEN: ${{ secrets.GH_TOKEN }}

This change makes the workflow dispatch step consistent with the homebridge-bot step on line 61, which already uses secrets.GH_TOKEN for PR operations that require elevated permissions.

Impact

This minimal one-line change will allow the alpha, beta, and stable dependency update workflows to successfully trigger the stage-2 build workflows after completing dependency updates and PR merges. The multi-stage release process will now complete end-to-end without permission errors.

Fixes #206.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: NorthernMan54 <19808920+NorthernMan54@users.noreply.github.com>
@Copilot Copilot AI changed the title [WIP] Action Failed Fix GitHub Actions workflow permission issue for triggering stage-2 builds Sep 5, 2025
@Copilot Copilot AI requested a review from NorthernMan54 September 5, 2025 18:12
Copilot finished work on behalf of NorthernMan54 September 5, 2025 18:12
@NorthernMan54 NorthernMan54 marked this pull request as ready for review September 5, 2025 19:21
@NorthernMan54 NorthernMan54 merged commit c7b4fec into latest Sep 5, 2025
@NorthernMan54 NorthernMan54 deleted the copilot/fix-206 branch September 5, 2025 19:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Action Failed
2 participants