Skip to content

Mirror workflow fails on tag pushes: 'src refspec main does not match any' #1

Description

@rz1989s

Repro: push a v* tag (release trigger). The Mirror to GitLab workflow runs on the tag-push event and fails in ~9s.

Observed (v0.2.0 tag push, run 33283109658):

error: src refspec main does not match any
error: failed to push some refs to 'gitlab.com:rz1989s/pi-statusline.git'

Cause: on a tag-push event the actions checkout is detached at the tag — there is no main ref in the local refmap, so git push gitlab main (and any branch refspec) cannot resolve. The main-push mirror event works fine (run 33283109731 succeeded).

Impact: GitLab ends up missing the release tag (code is mirrored via the main push; only the tag ref is absent).

Expected: tag pushes mirror the tag ref — e.g. guard the branch push and add git push gitlab $(git describe --tags --exact-match 2>/dev/null || true) on tag events, or compute the ref from github.ref (refs/tags/v0.2.0 → push that ref).

Env: mirror-gitlab.yml, org convention workflow (same template across getpipher repos — likely affects every repo's tag pushes wherever this template is deployed).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions