Skip to content

Provide option to only configure auth #234

Open
@btashton

Description

@btashton

I'm facing an issue where I have a git repo passed via an artifact or cache from another job in the workflow. I need to be able to run git command on this including pulling tags, but the auth does not seem to travel with it (even with persist enabled [worked at one point but not now]). I do not want to go through the process of checking out the repo and especially want to keep the ref as it is.

Right now I have to do something like this:

      - name: Export  Repo SHA
        run:  echo "::set-env name=rep_sha::`git -C sources/myrepo rev-parse HEAD`"
      - name: Refresh Git Credentials
        uses: actions/checkout@v2
        with:
          repository: org/repo
          ref: ${{ env.repo_sha }}
          path: sources/myrep
          fetch-depth: 1
      - name: Get Tags for Repo
        run: git -C sources/myrepo fetch --tags

Doing this still causes it to reach out via the checkout action and it requires me to fetch the rev in the previous step.

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