You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|`src_path`|Required|The source path to the file(s) or folder(s) to copy from. For example, `/.` or `path/to/home.md`.||
34
-
|`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`|
35
-
|`dst_owner`|Required|The name of the owner of the repository to push to. For example, `andstor`.||
36
-
|`dst_repo_name`|Required|The name of the repository to push to. For example, `copycat-action`.||
33
+
|`src_path`|Required|The source path to the file(s) or folder(s) to copy from. For example `/.` or `path/to/home.md`.||
34
+
|`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`|
35
+
|`dst_owner`|Required|The name of the owner of the repository to push to. For example `andstor`.||
36
+
|`dst_repo_name`|Required|The name of the repository to push to. For example `copycat-action`.||
37
37
|`src_branch`|Optional|The branch name of the source repository.|`master`|
38
38
|`dst_branch`|Optional|The branch name of the destination repository.|`master`|
39
-
|`src_filter`|Optional|A pattern for filtering files to be copied. For example `*.sh`||
39
+
|`clean`|Optional|Set to `true` if the `dst_path` should be emptied before copying.|`false`|
40
+
|`file_filter`|Optional|A simple [pattern](https://www.gnu.org/software/findutils/manual/html_mono/find.html#Shell-Pattern-Matching) for filtering files to be copied. Acts on file basename. For example `*.sh`.||
41
+
|`filter`|Optional|A glob pattern for filtering files to be copied. Acts on file paths. For example `**/!(*.*)`.||
42
+
|`exclude`|Optional|A glob pattern for excluding paths. For example `*/tests/*`.||
40
43
|`src_wiki`|Optional|Set to `true` if the source repository you want to copy from is the GitHub Wiki.| `false`|
41
44
|`dst_wiki`|Optional|Set to `true` if the destination repository you want to copy from is the GitHub Wiki.|`false`|
42
45
|`username`|Optional|The GitHub username to associate commits made by this GitHub action.|[`GITHUB_ACTOR`](https://help.github.com/en/actions/configuring-and-managing-workflows/using-environment-variables)|
43
-
|`email`|Optional|The email used for associating commits made by this GitHub action.|[`GITHUB_ACTOR`](https://help.github.com/en/actions/configuring-and-managing-workflows/using-environment-variables)`@users.noreply.github.com`|
46
+
|`email`|Optional|The email used for associating commits made by this GitHub action.|[`GITHUB_ACTOR`](https://help.github.com/en/actions/configuring-and-managing-workflows/using-environment-variables)`@users.noreply.github.com`|
44
47
45
48
## Secrets
46
49
47
50
* `personal_token`: (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).
48
51
52
+
## Filtering
53
+
Copycat provides several ways of filtering which files you want to copy.
54
+
All three types of filtering can be applied simultaneously.
55
+
56
+
### Input variables
57
+
#### `file_filter`
58
+
The `file_filter`input variable allows you to filter file basenames. Hence, you can for example only copy all text files by setting `file_filter`to `*.txt`. The variable only accepts simple [patterns](https://www.gnu.org/software/findutils/manual/html_mono/find.html#Shell-Pattern-Matching).
59
+
60
+
#### `filter`
61
+
The `filter` input variable provides extensive globbing support. It also supports extended globbing and globstar. The globbing applies to file paths. So, to for example match all files that doesn't have a file extention, the pattern could look like `**/!(*.*)`.
62
+
63
+
#### `exclude`
64
+
The `exclude` input variable can be used to exclude certain paths. It will apply to the file paths. One are for example able to exclude certain deirectory names. Setting `exclude` to `*/tests/*` results in only copying files that don't lie inside a folder named `tests` (both directly and indirectly). Here, a file with for example the path `foo/tests/bar/baz.txt` would not be copied over.
0 commit comments