https://github.com/guillaumefalourd/copy-push-files
GitHub Action to copy & push contents (files / directory) from a repository to another :octocat:
https://github.com/guillaumefalourd/copy-push-files
all-os-supported artifacts bash contents copy files github-actions
Last synced: 6 months ago
JSON representation
GitHub Action to copy & push contents (files / directory) from a repository to another :octocat:
- Host: GitHub
- URL: https://github.com/guillaumefalourd/copy-push-files
- Owner: GuillaumeFalourd
- License: apache-2.0
- Created: 2022-01-05T18:28:12.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2022-02-08T14:03:41.000Z (over 3 years ago)
- Last Synced: 2024-10-14T09:44:08.023Z (about 1 year ago)
- Topics: all-os-supported, artifacts, bash, contents, copy, files, github-actions
- Homepage: https://github.com/marketplace/actions/copy-push-files-action
- Size: 85 KB
- Stars: 2
- Watchers: 2
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# Copy & Push Files action
[](https://github.com/GuillaumeFalourd/copy-push-files/actions/workflows/ubuntu-action-test.yml) [](https://github.com/GuillaumeFalourd/copy-push-files/actions/workflows/macos-action-test.yml) [](https://github.com/GuillaumeFalourd/copy-push-files/actions/workflows/windows-action-test.yml)
[](https://github.com/GuillaumeFalourd/copy-push-files/actions/workflows/security-pipeline.yml) [](https://github.com/GuillaumeFalourd/copy-push-files/actions/workflows/gitleaks.yml)

☞ GitHub Action to copy & push contents (files / directory) from a repository to another :octocat:
_**Note**: This action is supported on **all runners** operating systems (`ubuntu`, `macos`, `windows`)_
* * *
## 📚 Usage
[](https://github.com/search?o=desc&q=GuillaumeFalourd+copy-push-files+path%3A.github%2Fworkflows+language%3AYAML&s=&type=Code)
### ⚠️ Requirements
- The [`actions/checkout`](https://github.com/marketplace/actions/checkout) is mandatory to use this action, as it will be necessary to access the repository files.
### `1️⃣ Minimal`: Commit and Push with `default` parameters
```yaml
steps:
- uses: actions/checkout@v2.3.4
- uses: GuillaumeFalourd/copy-push-files@v1
with:
source_files: file1 file2 directory1 directory2/file3
remote_repository: https://github.com//
access_token: ${{ secrets.ACCESS_TOKEN }}
```### `2️⃣ Full`: Commit and Push with `customized` parameters
```yaml
steps:
- uses: actions/checkout@v2.3.4
- uses: GuillaumeFalourd/copy-push-files@v1
with:
email: ${{ github.actor }}[bot]@users.noreply.github.com
name: ${{ github.actor }}
commit_message: your_message
target_branch: branch_name
source_files: file1 file2 directory1 directory2/file3
remote_repository: https://github.com//
access_token: ${{ secrets.ACCESS_TOKEN }}
```* * *
## ▶️ Action Inputs
Field | Mandatory | Default Value | Observation
------------ | ------------ | ------------- | -------------
**email** | NO | `${{ github.actor }}@users.noreply.github.com` | Github user email
_e.g: `octocat@github.com`_
**name** | NO | `${{ github.actor }}` | Github username
_e.g: `octocat`_
**commit_message** | NO | `Commit performed using Copy and Push Files action` | Commit message
**target_branch** | NO | `copy-push-files-branch` | Branch to push the contents on the other repository
**target_dir** | NO | `repository root` | Directory to push the contents on the other repository
**source_files** | YES | N/A | Files to add separated by space
_e.g: `file1 file2 directory1 directory2/file3`_
**remote_repository** | YES | N/A | Repository url to push the code
_e.g: `https://github.com//`_
**access_token** | YES | N/A | [Personal Access Token](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token) is necessary to push to another repository* * *
## 🤝 Contributing
☞ [Guidelines](https://github.com/GuillaumeFalourd/copy-push-files/blob/main/CONTRIBUTING.md)
## 🏅 Licensed
☞ This repository uses the [Apache License 2.0](https://github.com/GuillaumeFalourd/copy-push-files/blob/main/LICENSE)