☞ 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/checkout
is mandatory to use this action, as it will be necessary to access the repository files.
steps:
- uses: actions/[email protected]
- uses: GuillaumeFalourd/copy-push-files@v1
with:
source_files: file1 file2 directory1 directory2/file3
remote_repository: https://github.com/<owner>/<repo>
access_token: ${{ secrets.ACCESS_TOKEN }}
steps:
- uses: actions/[email protected]
- 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/<owner>/<repo>
access_token: ${{ secrets.ACCESS_TOKEN }}
Field | Mandatory | Default Value | Observation |
---|---|---|---|
NO | ${{ github.actor }}@users.noreply.github.com |
Github user email e.g: [email protected] |
|
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