mirror of
https://github.com/cpina/github-action-push-to-another-repository.git
synced 2024-12-22 16:16:09 -07:00
Improves README
This commit is contained in:
parent
ea53262753
commit
d5460a280b
23
README.md
23
README.md
|
@ -14,10 +14,10 @@ And pandoc-test-output can have Git Pages to give access to the files (or just l
|
||||||
From the repository that this Git Action is executed the directory that contains the files to be pushed into the repository.
|
From the repository that this Git Action is executed the directory that contains the files to be pushed into the repository.
|
||||||
|
|
||||||
### `destination-github-username` (argument)
|
### `destination-github-username` (argument)
|
||||||
For the repository `https://github.com/cpina/pandoc-test-output` is `cpina`. It's also used for the `Author:` in the generated git messages.
|
For the repository `https://github.com/cpina/push-to-another-repository-output` is `cpina`. It's also used for the `Author:` in the generated git messages.
|
||||||
|
|
||||||
### `destination-repository-name` (argument)
|
### `destination-repository-name` (argument)
|
||||||
For the repository `https://github.com/cpina/pandoc-test-output` is `pandoc-test-output`
|
For the repository `https://github.com/cpina/push-to-another-repository-output` is `push-to-another-repository-output`
|
||||||
|
|
||||||
### `user-email` (argument)
|
### `user-email` (argument)
|
||||||
The email that will be used for the commit in the destination-repository-name.
|
The email that will be used for the commit in the destination-repository-name.
|
||||||
|
@ -26,10 +26,19 @@ The email that will be used for the commit in the destination-repository-name.
|
||||||
E.g.:
|
E.g.:
|
||||||
`API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB }}`
|
`API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB }}`
|
||||||
|
|
||||||
Generate it from the Settings of the account that needs access to push.
|
Generate your personal token following the steps:
|
||||||
|
* Go to the Github Settings (on the right hand side on the profile picture)
|
||||||
|
* On the left hand side pane click on "Developer Settings"
|
||||||
|
* Click on "Personal Access Tokens" (also available at https://github.com/settings/tokens)
|
||||||
|
* Generate a new token, choose "Repo". Copy the token.
|
||||||
|
|
||||||
|
Then make the token available to the Github Action following the steps:
|
||||||
|
* Go to the Github page for the repository that you push from, click on "Settings"
|
||||||
|
* On the left hand side pane click on "Secrets"
|
||||||
|
* Click on "Add a new secret" and name it "API_TOKEN_GITHUB"
|
||||||
|
|
||||||
## Example usage
|
## Example usage
|
||||||
`
|
```yaml
|
||||||
- name: Pushes to another repository
|
- name: Pushes to another repository
|
||||||
uses: cpina/github-action-push-to-another-repository@master
|
uses: cpina/github-action-push-to-another-repository@master
|
||||||
env:
|
env:
|
||||||
|
@ -39,4 +48,8 @@ Generate it from the Settings of the account that needs access to push.
|
||||||
destination-github-username: 'cpina'
|
destination-github-username: 'cpina'
|
||||||
destination-repository-name: 'pandoc-test-output'
|
destination-repository-name: 'pandoc-test-output'
|
||||||
git-user-email: carles@pina.cat
|
git-user-email: carles@pina.cat
|
||||||
`
|
```
|
||||||
|
|
||||||
|
Working example:
|
||||||
|
|
||||||
|
https://github.com/cpina/push-to-another-repository-example/blob/master/.github/workflows/ci.yml
|
||||||
|
|
Loading…
Reference in New Issue
Block a user