https://github.com/andstor/copycat-action
:copyright::octocat: GitHub Action for copying files to other repositories
Science Score: 26.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Committers with academic emails
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (12.9%) to scientific vocabulary
Keywords
Keywords from Contributors
Repository
:copyright::octocat: GitHub Action for copying files to other repositories
Basic Info
- Host: GitHub
- Owner: andstor
- License: mit
- Language: Shell
- Default Branch: master
- Homepage: https://github.com/marketplace/actions/copycat-action
- Size: 483 KB
Statistics
- Stars: 106
- Watchers: 4
- Forks: 38
- Open Issues: 18
- Releases: 13
Topics
Metadata Files
README.md
COPYCAT
GitHub Action for copying files to other repositories.
This is a GitHub action to copy files from your repository to another external repository. It is also possible to copy files from/to repository Wikis.
This action runs in a Docker container and therefore only supports Linux.
Usage
The following example workflow step will copy all files from the repository running the action, to a folder named backup in the destination repo copycat-action. If the files already exist at the destination repo, they will be overwritten.
yml
- name: Copy
uses: andstor/copycat-action@v3
with:
personal_token: ${{ secrets.PERSONAL_TOKEN }}
src_path: /.
dst_path: /backup/
dst_owner: andstor
dst_repo_name: copycat-action
Options ⚙️
The following input variable options can/must be configured:
|Input variable|Necessity|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 name of the branch in source repository to clone from.|master|
|dst_branch|Optional|The name of the branch in the destination repository to push to. If the branch doesn't exists, the branch will be created based on the default branch.|master|
|clean|Optional|Set to true if the dst_path should be emptied before copying.|false|
|file_filter|Optional|A simple pattern for filtering files to be copied. Acts on file basename. For example *.sh.||
|filter|Optional|A glob pattern for filtering files to be copied. Acts on file paths. For example **/!(*.*).||
|exclude|Optional|A glob pattern for excluding paths. For example */tests/*.||
|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|
|commit_message|Optional|A custom git commit message.||
|username|Optional|The GitHub username to associate commits made by this GitHub action.|GITHUB_ACTOR|
|email|Optional|The email used for associating commits made by this GitHub action.|GITHUB_ACTOR @users.noreply.github.com|
Secrets
personal_token: (required) GitHub Private Access Token used for the clone/push operations. To create it follow the GitHub Documentation.
Filtering
Copycat provides several ways of filtering which files you want to copy.
All three types of filtering can be applied simultaneously.
Input variables
file_filter
The file_filterinput variable allows you to filter file basenames. Hence, you can for example only copy all text files by setting file_filterto *.txt. The variable only accepts simple patterns.
filter
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 **/!(*.*).
exclude
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.
Examples
Copy wiki files to external repo
This workflow configuration will copy all files from the repository's wiki to a folder named wiki in the destination repo andstor.github.io.
This can for example be used to merge several wikies of an organisation, and display them on a custom GitHub Pages site. The Jekyll theme Paper has support for this.
yml
name: Copy
on: gollum
jobs:
copy:
runs-on: ubuntu-latest
steps:
- name: Copycat
uses: andstor/copycat-action@v3
with:
personal_token: ${{ secrets.PERSONAL_TOKEN }}
src_path: /.
dst_path: /wiki/
dst_owner: andstor
dst_repo_name: andstor.github.io
dst_branch: master
src_branch: master
src_wiki: true
dst_wiki: false
username: nutsbot
email: andr3.storhaug+bot@gmail.com
Author
The Copycat GitHub action is written by André Storhaug andr3.storhaug@gmail.com
License
This project is licensed under the MIT License - see the LICENSE file for details.
Owner
- Name: André Storhaug
- Login: andstor
- Kind: user
- Location: Trondheim 🇳🇴
- Company: NTNU
- Website: https://andre.storhaug.no
- Repositories: 87
- Profile: https://github.com/andstor
🎓 CS PhD student @ Norwegian University of Science and Technology (NTNU)
GitHub Events
Total
- Watch event: 3
- Push event: 2
- Fork event: 2
- Create event: 1
Last Year
- Watch event: 3
- Push event: 2
- Fork event: 2
- Create event: 1
Committers
Last synced: 9 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| André Storhaug | a****g@g****m | 101 |
| Yayo | y****t@g****m | 8 |
| Henry Zhang | h****2@g****m | 5 |
| Ricardo Monteiro Simoes | r****3@h****m | 3 |
| Mark Cheret | m****k@c****e | 2 |
| Justin Busschau | j****u@n****m | 2 |
| Ryan Wallace | r****l@g****m | 1 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 9 months ago
All Time
- Total issues: 34
- Total pull requests: 35
- Average time to close issues: 2 months
- Average time to close pull requests: about 18 hours
- Total issue authors: 29
- Total pull request authors: 12
- Average comments per issue: 2.24
- Average comments per pull request: 0.4
- Merged pull requests: 30
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 0
- Pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- andstor (4)
- vencho-mdp (2)
- yceballost (2)
- woodman231 (1)
- Guite (1)
- MindaugasLaganeckas (1)
- spencer741 (1)
- craigh (1)
- edwardskrod (1)
- figo-sf (1)
- ainsleyclark (1)
- giadasp (1)
- huksley (1)
- fariskamaludin-skymind (1)
- asemlucben (1)
Pull Request Authors
- andstor (24)
- RicardoMonteiroSimoes (1)
- Dumberdore (1)
- henryzt (1)
- yceballost (1)
- rywall (1)
- MarieSaphira (1)
- spencer741 (1)
- JustinBusschau (1)
- infinitepower18 (1)
- markcheret (1)
- figo-sf (1)
Top Labels
Issue Labels
Pull Request Labels
Dependencies
- Actions-R-Us/actions-tagger latest composite
- Dockerfile * docker
- alpine 3.10 build