Skip to content

GuillaumeFalourd/copy-push-files

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

73 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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