Skip to content

Commit

Permalink
Update readme file
Browse files Browse the repository at this point in the history
  • Loading branch information
andstor committed Jul 8, 2019
1 parent c983888 commit f0aa8c8
Showing 1 changed file with 29 additions and 16 deletions.
45 changes: 29 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,40 @@
# Copycat
GitHub action for copying files from one repository to another.
[GitHub action](https://developer.github.com/actions/) for copying files from one repository to another.

## Usage
```
action "Copycat" {
uses = "andstor/[email protected]"
secrets = ["GH_PAT"]
env = {
DST_OWNER = "andstor"
DST_REPO_NAME = "copycat-action"
SRC_WIKI = "true"
DST_PATH = "/wiki/"
SRC_PATH = "/."
}
}
```

## Environment variables
The following environment variable options can/must be configured:

The following environment variable options can be configured:

|Environment variable|Description|Default|
|-------|-----------| ---- |
|`SRC_PATH`|The source path to the file(s) or folder(s) to copy from. For example,`home.md`||
|`DST_PATH`|The destination path to copy the file(s) or folder(s) to. For example, `pages/.`. |`SRC_PATH`|
|`DST_OWNER`|The name of the owner of the repository to push to. For example, `andstor`.||
|`DST_REPO_NAME`|The name of the repository to push to. For example, `copycat-action`.||
|`SRC_BRANCH`|The branch name of the source repository. Optional.|`master`|
|`DST_BRANCH`|The branch name of the destination repository. Optional.|`master`|
|`SRC_WIKI`|Set to `true` if the source repository you want to copy from is the GitHub Wiki.| `false`|
|`DST_WIKI`|Set to `true` if the destination repository you want to copy from is the GitHub Wiki.|`false`|

|Environment variable|Required|Description|Default|
|--------------------|--------|-----------|-------|
|`SRC_PATH`|Required|The source path to the file(s) or folder(s) to copy from. For example, `/.` or `path/to/home.md`.||
|`DST_PATH`|Optional|The destination path to copy the file(s) or folder(s) to. For example, `/wiki/` or `path/to/index.md`. |`SRC_PATH`|
|`DST_OWNER`|Required|The name of the owner of the repository to push to. For example, `andstor`.||
|`DST_REPO_NAME`|Required|The name of the repository to push to. For example, `copycat-action`.||
|`SRC_BRANCH`|Optional|The branch name of the source repository. Optional.|`master`|
|`DST_BRANCH`|Optional|The branch name of the destination repository. Optional.|`master`|
|`SRC_WIKI`|Optional|Set to `true` if the source repository you want to copy from is the GitHub Wiki.| `false`|
|`DST_WIKI`|Optional|Set to `true` if the destination repository you want to copy from is the GitHub Wiki.|`false`|

## Secrets
* `GITHUB_TOKEN`: (required) Include the [GitHub token secret](https://developer.github.com/actions/creating-workflows/storing-secrets/#github-token-secret) to make authenticated calls to the GitHub API for the **source repository**.
* `GH_PAT`: (required) GitHub Private Access Token used for the clone/push operations. To create it follow the [GitHub Documentation](https://help.github.com/en/articles/creating-a-personal-access-token-for-the-command-line).

## Author
The Copycat GitHub action is written by [André Storhaug](https://github.com/andstor) <[email protected]>

* `GH_PAT`: (required) GitHub Private Access Token used for the clone/push operations for the **destination repository**. To create it follow the [GitHub Documentation](https://help.github.com/en/articles/creating-a-personal-access-token-for-the-command-line).
## License
This project is licensed under the [MIT License](https://opensource.org/licenses/MIT) - see the [LICENSE](LICENSE) file for details.

0 comments on commit f0aa8c8

Please sign in to comment.