Skip to content
git-commit

GitHub Action

Copy Push Files action

v1 Latest version

Copy Push Files action

git-commit

Copy Push Files action

GitHub Action to copy & push contents (files / directory) from a repository to another :octocat:

Installation

Copy and paste the following snippet into your .yml file.

              

- name: Copy Push Files action

uses: GuillaumeFalourd/copy-push-files@v1

Learn more about this action in GuillaumeFalourd/copy-push-files

Choose a version

Copy & Push Files action

Action test on Ubuntu Action test on MacOS Action test on Windows

Security Pipeline Gitleaks

☞ 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

Public workflows that use this action.

⚠️ Requirements

  • The 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

    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/<owner>/<repo>
          access_token: ${{ secrets.ACCESS_TOKEN }}

2️⃣ Full: Commit and Push with customized parameters

    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/<owner>/<repo>
          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/<owner>/<repo>
access_token YES N/A Personal Access Token is necessary to push to another repository

🤝 Contributing

Guidelines

🏅 Licensed

☞ This repository uses the Apache License 2.0