Skip to content

Fixes for private repos

Compare
Choose a tag to compare
@aormsby aormsby released this 25 Jul 23:09

Previous versions were not properly handling private repo access because of a misunderstanding in how the Github checkout action works. This is fixed by adding the input var target_repo_token to store the environment variable secrets.GITHUB_TOKEN Sample use--

steps:
  - name: Checkout target repo
    uses: actions/checkout@v2
    with:
      ref:  my-target-branch
      persist-credentials: false       # not needed for public upstream, but fine to keep

  - name: Sync upstream changes
    id: sync
    uses: aormsby/Fork-Sync-With-Upstream-action@v3.0
    with:
      target_branch: my-branch
      upstream_branch: main
      upstream_repository: your-name/your-repo
      github_token: ${{ secrets.UPSTREAM_TOKEN }}
      target_repo_token: ${{ secrets.GITHUB_TOKEN }}

See [wiki setup notes](https://github.com/aormsby/Fork-Sync-With-Upstream-action/wiki/Configuration#setup-notes for more details. (Note: the wiki is for v3, so the input vars are named differently. Same config, though.)

Other additions:

  • domain input for repos in different domains
  • some typo fixes

This is the final update for v2.