Skip to content

ci: add Codeberg mirror workflow#14

Merged
thedavidweng merged 2 commits into
mainfrom
add-codeberg-mirror
Jun 20, 2026
Merged

ci: add Codeberg mirror workflow#14
thedavidweng merged 2 commits into
mainfrom
add-codeberg-mirror

Conversation

@thedavidweng

Copy link
Copy Markdown
Owner

Mirror to codeberg.org/thedavidweng/money on every push.

@greptile-apps

greptile-apps Bot commented Jun 20, 2026

Copy link
Copy Markdown

Greptile Summary

This PR adds a GitHub Actions workflow that mirrors the repository to Codeberg on every push (all branches and tags) and on manual dispatch.

  • The new workflow (mirror.yml) checks out the full history with fetch-depth: 0 and pushes to codeberg.org/thedavidweng/money using a CODEBERG_TOKEN secret, with a 5-minute timeout and minimal contents: read permissions.
  • The third-party cssnr/mirror-repository-action is correctly pinned to a full commit SHA (4e3e1a67ee37ac30073df96fe9f53ef7ec4a4f80) with a # v1 comment for human readability.

Confidence Score: 5/5

Safe to merge — the workflow is a straightforward read-only mirror with well-scoped permissions and no changes to application logic.

The change adds a single CI workflow file. Credentials are stored in GitHub Secrets, permissions are limited to contents: read, and the one third-party action is pinned to a full commit SHA. There are no issues that would affect correctness or security.

No files require special attention.

Important Files Changed

Filename Overview
.github/workflows/mirror.yml New workflow that mirrors all branches and tags to Codeberg; third-party action is properly SHA-pinned, credentials are handled via secrets, and permissions are scoped to contents: read.

Sequence Diagram

%%{init: {'theme': 'neutral'}}%%
sequenceDiagram
    participant GH as GitHub (push / workflow_dispatch)
    participant Runner as ubuntu-latest runner
    participant Checkout as actions/checkout@v4
    participant Mirror as cssnr/mirror-repository-action@SHA
    participant CB as codeberg.org/thedavidweng/money

    GH->>Runner: trigger (branch push / tag push / manual)
    Runner->>Checkout: fetch-depth: 0 (full history)
    Checkout-->>Runner: local clone ready
    Runner->>Mirror: host, username, CODEBERG_TOKEN
    Mirror->>CB: git push --mirror
    CB-->>Mirror: success
    Mirror-->>Runner: done
Loading
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
sequenceDiagram
    participant GH as GitHub (push / workflow_dispatch)
    participant Runner as ubuntu-latest runner
    participant Checkout as actions/checkout@v4
    participant Mirror as cssnr/mirror-repository-action@SHA
    participant CB as codeberg.org/thedavidweng/money

    GH->>Runner: trigger (branch push / tag push / manual)
    Runner->>Checkout: fetch-depth: 0 (full history)
    Checkout-->>Runner: local clone ready
    Runner->>Mirror: host, username, CODEBERG_TOKEN
    Mirror->>CB: git push --mirror
    CB-->>Mirror: success
    Mirror-->>Runner: done
Loading

Reviews (2): Last reviewed commit: "fix: pin action SHA, remove test.txt, ad..." | Re-trigger Greptile

Comment thread .github/workflows/mirror.yml Outdated
@thedavidweng thedavidweng merged commit f1639ad into main Jun 20, 2026
9 of 10 checks passed
@thedavidweng thedavidweng deleted the add-codeberg-mirror branch June 20, 2026 18:14
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.

1 participant