Skip to content

Commit 4964d1e

Browse files
committed
Plugin upgrade guide: Add section Private Repositories; Improve example command to search keyword in the codebase
1 parent 021e90b commit 4964d1e

1 file changed

Lines changed: 37 additions & 1 deletion

File tree

docs/pages/guides/plugin-upgrade.md

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ Replace all occurences of `tgbl`, `tangible_plugin_framework`, and `$framework`.
308308
Search for a keyword in the codebase.
309309

310310
```sh
311-
grep -R framework
311+
grep -Rn --exclude-dir=.git --exclude-dir=node_modules --exclude-dir=publish --exclude-dir=vendor framework
312312
```
313313

314314
Example of old framework usage.
@@ -362,3 +362,39 @@ npm run format
362362
```
363363

364364
Or directly with `npx roll format`.
365+
366+
## Private repositories
367+
368+
For projects with dependencies that are private repositories, it's necessary to set up a secret token to authenticate Git.
369+
370+
- Create a [fine-grained personal token](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens#creating-a-fine-grained-personal-access-token)
371+
- Go to developer settings, select Personal Access Tokens, then Fine-grained tokens.
372+
- Click "Generate new token"
373+
- Change the resource owner to the organization `TangibleInc`
374+
- Allow cloning all repositories inside your github action.
375+
- Add this token as a repository-level secret
376+
- Go to repository's Settings -> Security -> Secrets and variables -> Actions
377+
- Add a new repository secret with the name `TANGIBLE_PIPELINE_ACCESS_TOKEN`
378+
- The value is the newly generated personal token
379+
- Pass the token in GitHub Actions, for example `.github/workflows/release.yml`
380+
381+
```yml
382+
jobs:
383+
build:
384+
runs-on: ubuntu-latest
385+
env:
386+
ACCESS_TOKEN: ${{ secrets.TANGIBLE_PIPELINE_ACCESS_TOKEN }}
387+
steps:
388+
- name: Checkout
389+
uses: actions/checkout@v4
390+
with:
391+
fetch-depth: 0
392+
- name: Setup Bun
393+
uses: oven-sh/setup-bun@v2
394+
- name: Install dependencies
395+
run: |
396+
echo "https://TangibleInc:$ACCESS_TOKEN@github.com" >> $HOME/.git-credentials
397+
git config --global credential.helper store
398+
bun install
399+
rm -rf ${HOME}/.git-credentials
400+
```

0 commit comments

Comments
 (0)