41 lines
1.3 KiB
YAML
41 lines
1.3 KiB
YAML
name: Mirror a git-annex repository
|
||
description: Synchronize a bare git-annex repository with a remote by fetching branch refs, optionally pruning missing branches and force‑updating tags, merging git‑annex metadata, all without transferring annexed file contents
|
||
|
||
inputs:
|
||
repo:
|
||
description: Path to the bare git-annex repository (defaults to current directory)
|
||
required: false
|
||
default: .
|
||
type: string
|
||
remote:
|
||
description: Name of the configured remote (defaults to "origin")
|
||
required: false
|
||
default: origin
|
||
type: string
|
||
prune:
|
||
description: Delete local branches absent from remote
|
||
required: false
|
||
default: false
|
||
type: boolean
|
||
force-tags:
|
||
description: Force-update tags from remote
|
||
required: false
|
||
default: false
|
||
type: boolean
|
||
quiet:
|
||
description: Suppress informational output
|
||
required: false
|
||
default: false
|
||
type: boolean
|
||
|
||
runs:
|
||
using: composite
|
||
steps:
|
||
- name: Mirror git-annex repository
|
||
shell: bash
|
||
run: |
|
||
flags=""
|
||
if ${{ inputs.prune }}; then flags+=" --prune"; fi
|
||
if ${{ inputs.force-tags }}; then flags+=" --force-tags"; fi
|
||
if ${{ inputs.quiet }}; then flags+=" --quiet"; fi
|
||
"${{ github.action_path }}/git-annex-ref-mirror" $flags ${{ inputs.repo }} ${{ inputs.remote }}
|