☞ GitHub Action to copy & push contents (files / directory) from a repository to another ![]()
Note: This action is supported on all runners operating systems (ubuntu, macos, windows)
- The
actions/checkoutis mandatory to use this action, as it will be necessary to access the repository files.
steps:
- uses: actions/checkout@v6
- uses: GuillaumeFalourd/copy-push-files@v2
with:
source_files: file1 file2 directory1 directory2/file3
remote_repository: https://github.com/<owner>/<repo>
access_token: ${{ secrets.ACCESS_TOKEN }} steps:
- uses: actions/checkout@v6
- uses: GuillaumeFalourd/copy-push-files@v2
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/<owner>/<repo>
access_token: ${{ secrets.ACCESS_TOKEN }}| Field | Mandatory | Default Value | Observation |
|---|---|---|---|
| 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/<owner>/<repo> |
| access_token | YES | N/A | Personal Access Token is necessary to push to another repository |
☞ This repository uses the Apache License 2.0
