Skip to content

Proposal: official GitHub Action wrapper for git-sync #32

@mvanhorn

Description

@mvanhorn

Problem

git-sync is a one-shot CLI explicitly meant to run "from cron, CI, a worker, or another service" (README FAQ). There is no first-party GitHub Action today. The dominant alternative is pixta-dev/repository-mirroring-action (269 stars), which uses native git clone-and-push and so cannot benefit from the streaming relay this project was built around.

Proposal

Ship a composite Action at the repo root (action.yml) that downloads the released binary for the runner's OS/arch and executes it with user-supplied inputs.

Example usage:

- uses: entireio/git-sync@v0.4.2
  with:
    source: https://github.com/${{ github.repository }}.git
    target: https://gitlab.com/example/mirror.git
    target-token: ${{ secrets.GITLAB_TOKEN }}
    branch: main,release
    tags: 'true'
    prune: 'true'

Why composite

  • The CLI is a single static binary, no JS runtime needed
  • Composite supports Linux, macOS, and Windows runners (Docker Actions are Linux-only)
  • Versioning maps cleanly to release tags (@v0.4.2)
  • The team already publishes per-OS / per-arch artifacts via GoReleaser, so install.sh just downloads and verifies SHA256 from checksums.txt

Open questions for maintainers

  1. Versioning policy: do you want major-tag aliases (@v0, @v1) maintained alongside specific tags (@v0.4.2)? GitHub Marketplace conventions suggest both.
  2. Action location: at the repo root (action.yml) so uses: entireio/git-sync@v0.4.2 works directly, or in a sibling repo (entireio/git-sync-action)? Repo-root is simpler but couples Action releases to CLI releases.
  3. Marketplace listing branding: any existing icon / color preferences? I defaulted to git-merge / purple.
  4. JSON output forwarding: I planned to expose the JSON result as a step output when --json is set. Any concerns about leaking sensitive ref names into workflow logs?

The existing GoReleaser checksums.txt path is what install.sh would consume; no release pipeline changes needed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions