Skip to content

00mjk/clone-github-repo-action

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Clone Github Repository Action

Clone Public Repository Workflow

Clone Private Repository Workflow

Title

Github Action to clone a public or private Github repository and access its content on others repositories' workflows.

Public workflows that use this action.Who is using this action? (public repositories)

How to use this action?

Create a new .yml file on your .github/workflows directory.

Field Mandatory Observation
owner YES Ex: octocat
repository YES Ex: clone-github-repo-action
access-token NO How to create a PAT

You can use one of those as reference:

For a public repository

- name: Clone GuillaumeFalourd/poc-github-actions PUBLIC repository
  uses: GuillaumeFalourd/clone-github-repo-action@v1
  with:
    owner: 'GuillaumeFalourd'
    repository: 'poc-github-actions'

For a private repository

To use this action to clone a PRIVATE repository the Github User/Admin has access to, it's necessary to create a PERSONAL ACCESS TOKEN with REPOSITORY scopes.

- name: Clone GuillaumeFalourd/formulas-training PRIVATE repository
  uses: GuillaumeFalourd/clone-github-repo-action@v1
  with:
    owner: 'GuillaumeFalourd'
    repository: 'formulas-training'
    access-token: ${{ secrets.ACCESS_TOKEN }}

Access repository content

After using this action in your workflow, you can use the following command to access the cloned repository content:

cd <repository-name>

Step Example

- name: Access cloned repository content
  run: |
    cd <repository-name>
    ls -l

Licensed

☞ This repository uses the Apache License 2.0

About

Github Action to clone a public or private Github repository and access its content on others repositories' workflows ♻️

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Shell 52.5%
  • Dockerfile 47.5%