Skip to content

Commit 3f9ba1f

Browse files
committed
Improve README.md with details of the PAT
1 parent 9543f7e commit 3f9ba1f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ For the repository `https://github.com/cpina/push-to-another-repository-output`
2020
### `destination-repository-name` (argument)
2121
For the repository `https://github.com/cpina/push-to-another-repository-output` is `push-to-another-repository-output`
2222

23-
*Warning:* this Github Action currently deletes all the files and directories in the destination repository. The idea is to copy from an `output` directory into the `destination-repository-name` having a copy without any previous files there.
23+
*Warning:* this GitHub Action currently deletes all the files and directories in the destination repository. The idea is to copy from an `output` directory into the `destination-repository-name` having a copy without any previous files there.
2424

2525
### `user-email` (argument)
2626
The email that will be used for the commit in the destination-repository-name.
@@ -52,11 +52,15 @@ Generate your personal token following the steps:
5252
* Click on "Personal Access Tokens" (also available at https://github.com/settings/tokens)
5353
* Generate a new token, choose "Repo". Copy the token.
5454

55+
⚠️ : The "Personal Access Token" that you just generated gives access to any repository to which you have access (it's not possible to restrict it to one repository). Technically anyone with *write* access to a repository where the token is made available via "Add a new secret" (next step), might manage to access it. The action also uses the token; you can verify how it is used in entrypoint.sh . I'm in the process of implementing deploy keys which would allow it to give access to only the destination repository. Updates on https://github.com/cpina/github-action-push-to-another-repository/issues/66 . Possible workaround for now: use a specific GitHub user who has access only to the destination repository.
56+
5557
Then make the token available to the Github Action following the steps:
5658
* Go to the Github page for the repository that you push from, click on "Settings"
5759
* On the left hand side pane click on "Secrets"
5860
* Click on "Add a new secret" and name it "API_TOKEN_GITHUB"
5961

62+
63+
6064
## Example usage
6165
```yaml
6266
- name: Pushes to another repository

0 commit comments

Comments
 (0)