Conversation
There was a problem hiding this comment.
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]' | ||
|
|
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ECC-8262: Fix mirror workflow for Dependabot pushes
When Dependabot pushes a dependency update, GitHub restricts the job to
Secret source: Dependabotwith read-only permissions — theBITBUCKET_ACCESS_TOKENsecret is not available. This causes the mirror to fail silently on every Dependabot commit.Changes
mirror-repository.yaml: addedif: 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 belowmirror-repository-dependabot.yaml(new): triggered viaworkflow_runfrom the beacon — runs in the main repo context whereBITBUCKET_ACCESS_TOKENis available, performs the actual mirrorThis is the same pattern already used in
corvina-backend.