Skip to content

withlazers/copy-to-repo-action

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

copy-to-repo-action

Copies files from a workflow run to another repository

Inputs

source_path

Required Source path in the workflow

target_repository

Required Target repository

target_branch

The branch the source is copied to. If unset the default branch is used.

target_path

Required The path the source is copied to. Must contain the target file name.

commit_message

Required Commit Message

git_user_email

The mail address used in the commit

git_user_name

The mail address used in the commit

ssh_key

Required SSH key used for pushing and pulling.

Outputs

None

Usage

Preparations

Create a new ssh-key

Run the following command:

ssh-keygen -f /tmp/deploy_key -N ''

Action Secret

Put the private key to the Action secrets of the source repository ( = the repository that runs the action) Screenshot of Repository Settings -> Secrets -> Actions Screenshot of Repository Settings -> Secrets -> Actions -> New Secret

  • Name: An arbitrary identifier that will be used to identify the secret from within the pipeline
  • Value: The content of /tmp/deploy_key.

Deployment Public Key

Put the public key to the Deploy keys of the target repository ( = the repository where the files are copied to) Screenshot of Repository Settings -> Deploy Keys Screenshot of Repository Settings -> Deploy Keys -> Add New

  • Title: An arbitrary identifier. It makes sense to mention the source repository here.
  • Key: The content of /tmp/deploy_key.pub.
  • Allow write access: Must be checked

About

Copies files from a workflow run to another repository

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published