Skip to content

Mirroring a repo in an Action fails after update to latest checkout version #2563

Description

@hongooi73

I have some repos in one organisation that, for historical reasons, are mirrored in another organisation. To do the mirroring, I have the following code setup as a GH action:

    steps:
      - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
        with:
          fetch-depth: 0  # required for mirroring, see https://stackoverflow.com/a/64272409/474349

      - name: Copy to Cloudyr
        if: github.repository_owner == 'Azure' && runner.os == 'Linux' && github.ref == 'refs/heads/master'
        env:
          token: "${{ secrets.ghPat }}"
        # git config hack required, see https://stackoverflow.com/q/64270867/474349
        run: |
          export CLOUDYR_REPO=$(echo $GITHUB_REPOSITORY | sed "s/Azure/cloudyr/")
          git config -l | grep 'http\..*\.extraheader' | cut -d= -f1 | \
            xargs -L1 git config --unset-all
          git push --prune https://token:$token@github.com/${CLOUDYR_REPO}.git +refs/remotes/origin/*:refs/heads/* +refs/tags/*:refs/tags/*

... more steps ...

This copies the repo from the Azure org to Cloudyr, and worked perfectly for years. Yesterday the GH dependabot made a PR to update all the pinned version numbers to the latest (v7.0.1 for the checkout action, as seen above). Since then, the step has failed at this point:

Run export CLOUDYR_REPO=$(echo $GITHUB_REPOSITORY | sed "s/Azure/cloudyr/")
# [debug]/usr/bin/bash -e /home/runner/work/_temp/9163680c-38a6-43e6-8b4f-4f62fa2c4dcc.sh
Error: Process completed with exit code 123.

You can see the repo and full log here.

Does anyone know what's causing this problem, and how I can fix it?

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