Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add deploy key scenario to README #302

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Add deploy key scenario to README
  • Loading branch information
odlp authored Jul 13, 2020
commit 7c625ee8663dd194b25076f671400d79eebeaaca
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -174,6 +174,8 @@ Refer [here](https://github.com/actions/checkout/blob/v1/README.md) for previous

## Checkout multiple repos (private)

### Using a personal access token

```yaml
- name: Checkout
uses: actions/checkout@v2
@@ -190,6 +192,23 @@ Refer [here](https://github.com/actions/checkout/blob/v1/README.md) for previous

> - `${{ github.token }}` is scoped to the current repository, so if you want to checkout a different repository that is private you will need to provide your own [PAT](https://help.github.com/en/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line).

### Using a deploy key

Unlike personal access tokens, [deploy keys](https://developer.github.com/v3/guides/managing-deploy-keys/#deploy-keys) can be scoped to a specific repository.

```yaml
- name: Checkout
uses: actions/checkout@v2
with:
path: main

- name: Checkout private tools
uses: actions/checkout@v2
with:
repository: my-org/my-private-tools
ssh-key: ${{ secrets.PRIVATE_DEPLOY_KEY }} # `PRIVATE_DEPLOY_KEY` is a secret that contains your private deploy key
path: my-tools
```

## Checkout pull request HEAD commit instead of merge commit