Skip to content

ECC-8262: fix mirror workflow for Dependabot pushes#19

Closed
pisto wants to merge 1 commit into
masterfrom
ECC-8262
Closed

ECC-8262: fix mirror workflow for Dependabot pushes#19
pisto wants to merge 1 commit into
masterfrom
ECC-8262

Conversation

@pisto
Copy link
Copy Markdown
Contributor

@pisto pisto commented May 26, 2026

ECC-8262: Fix mirror workflow for Dependabot pushes

When Dependabot pushes a dependency update, GitHub restricts the job to Secret source: Dependabot with read-only permissions — the BITBUCKET_ACCESS_TOKEN secret is not available. This causes the mirror to fail silently on every Dependabot commit.

Changes

  • mirror-repository.yaml: added if: github.actor != 'dependabot[bot]' to skip the job when Dependabot triggers it (it would fail anyway — this prevents the spurious failure)
  • dependabot-push.yaml (new): beacon workflow that runs on Dependabot pushes and completes successfully, triggering the privileged workflow below
  • mirror-repository-dependabot.yaml (new): triggered via workflow_run from the beacon — runs in the main repo context where BITBUCKET_ACCESS_TOKEN is available, performs the actual mirror

This is the same pattern already used in corvina-backend.

Copilot AI review requested due to automatic review settings May 26, 2026 14:49
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates the repository mirroring setup so Dependabot-triggered pushes no longer fail due to unavailable secrets, while still enabling mirroring to Bitbucket via a privileged workflow path.

Changes:

  • Skip the existing mirror job when the push actor is dependabot[bot].
  • Add a “beacon” workflow that runs on Dependabot pushes.
  • Add a workflow_run-triggered mirror workflow that runs with access to repo secrets.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.

File Description
.github/workflows/mirror-repository.yaml Skips mirroring when triggered directly by Dependabot.
.github/workflows/dependabot-push.yaml Adds a Dependabot push detector (beacon) workflow to trigger a privileged run.
.github/workflows/mirror-repository-dependabot.yaml Adds a workflow_run-based mirror job intended to run with secrets available.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +11 to +13
- run: echo "Dependabot PR validated"
- name: Debug workflow_run event
run: echo "${{ toJson(github.event.workflow_run) }}"
name: Dependabot Push Detector

on:
push:
Comment on lines +12 to +13
- name: Debug workflow_run event
run: echo "${{ toJson(github.event.workflow_run) }}"
Comment on lines +15 to +16
github.event.workflow_run.actor == 'dependabot[bot]'

@pisto pisto closed this May 26, 2026
@pisto pisto deleted the ECC-8262 branch May 26, 2026 17:28
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.

2 participants