ci: mirror the repository to GitLab - #36
Merged
Merged
Conversation
Same mirror workflow as gitlab-mcp-server: force-pushes all branches and tags to the gitlab.com/jmrp mirror on every push (plus a 6h cron), and syncs GitHub releases to GitLab releases whose asset links point back at the canonical GitHub assets. Secrets: GITLAB_MIRROR_SSH_KEY (deploy key with push on the mirror) and GITLAB_API_TOKEN (project access token, releases sync).
Reviewer's GuideAdds a scheduled and event-driven GitHub Actions workflow that force-mirrors branches and tags to GitLab over authenticated SSH, and reconciles published GitHub releases and their assets into GitLab releases via API links. Sequence diagram for repository mirroringsequenceDiagram
participant Trigger as GitHub event
participant Actions as GitHub Actions
participant GitHub as GitHub repository
participant GitLab as GitLab repository
Trigger->>Actions: Start GitLab Mirror
Actions->>Actions: Configure GitLab SSH key
Actions->>GitHub: git fetch --prune --tags
GitHub-->>Actions: Branch and tag refs
Actions->>GitLab: git push --force --prune branches and tags
GitLab-->>Actions: Mirrored refs
Sequence diagram for GitHub release synchronizationsequenceDiagram
participant Trigger as Release or scheduled event
participant Actions as GitHub Actions
participant GitHub as GitHub Releases API
participant GitLab as GitLab Releases API
Trigger->>Actions: Start release synchronization
Actions->>GitHub: gh api releases
GitHub-->>Actions: Published releases and assets
loop Each published release
Actions->>GitHub: gh release view tag
GitHub-->>Actions: Release metadata and asset URLs
Actions->>GitLab: GET release by tag
alt Release exists
Actions->>GitLab: PUT release metadata
else Release is missing
Actions->>GitLab: POST release metadata
end
Actions->>GitLab: POST or PUT release asset links
Actions->>GitLab: DELETE stale asset links
end
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
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.
Same mirror workflow as gitlab-mcp-server: force-pushes branches and tags to gitlab.com/jmrp/TFG-TFM_EPS on every push (plus a 6h cron) and syncs GitHub releases to GitLab releases with asset links back to the canonical GitHub assets. Secrets GITLAB_MIRROR_SSH_KEY and GITLAB_API_TOKEN are already configured.
Summary by Sourcery
Mirror the repository and published releases to GitLab through an automated GitHub Actions workflow.
New Features:
Enhancements:
CI: