{"id":16497279,"url":"https://github.com/guillaumefalourd/clone-github-repo-action","last_synced_at":"2025-03-16T18:32:11.997Z","repository":{"id":37438589,"uuid":"365243516","full_name":"GuillaumeFalourd/clone-github-repo-action","owner":"GuillaumeFalourd","description":"Github Action to clone a public or private Github repository and access its content on others repositories' workflows ♻️","archived":false,"fork":false,"pushed_at":"2023-12-14T14:25:36.000Z","size":59,"stargazers_count":41,"open_issues_count":3,"forks_count":15,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-04-19T21:25:14.041Z","etag":null,"topics":["clone-repos","github","github-action","hacktoberfest","useful","utilities","workflows"],"latest_commit_sha":null,"homepage":"https://github.com/marketplace/actions/clone-github-repo-action","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/GuillaumeFalourd.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-05-07T13:32:14.000Z","updated_at":"2024-06-18T15:26:54.268Z","dependencies_parsed_at":"2023-12-14T15:50:36.227Z","dependency_job_id":null,"html_url":"https://github.com/GuillaumeFalourd/clone-github-repo-action","commit_stats":{"total_commits":35,"total_committers":2,"mean_commits":17.5,"dds":0.08571428571428574,"last_synced_commit":"295f5b77735f4e7a8091ac0e01f3d5a0c27635b5"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GuillaumeFalourd%2Fclone-github-repo-action","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GuillaumeFalourd%2Fclone-github-repo-action/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GuillaumeFalourd%2Fclone-github-repo-action/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GuillaumeFalourd%2Fclone-github-repo-action/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GuillaumeFalourd","download_url":"https://codeload.github.com/GuillaumeFalourd/clone-github-repo-action/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243826783,"owners_count":20354220,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["clone-repos","github","github-action","hacktoberfest","useful","utilities","workflows"],"created_at":"2024-10-11T14:39:04.365Z","updated_at":"2025-03-16T18:32:08.602Z","avatar_url":"https://github.com/GuillaumeFalourd.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Clone Github Repository Action\n\n[![Public workflows that use this action.](https://img.shields.io/endpoint?url=https%3A%2F%2Fapi-endbug.vercel.app%2Fapi%2Fgithub-actions%2Fused-by%3Faction%3DGuillaumeFalourd%2Fclone-github-repo-action%26badge%3Dtrue)](https://github.com/search?o=desc\u0026q=GuillaumeFalourd+clone-github-repo-action+path%3A.github%2Fworkflows+language%3AYAML\u0026s=\u0026type=Code) [![Clone Public Repository Workflow](https://github.com/GuillaumeFalourd/clone-github-repo-action/actions/workflows/public-repo.yml/badge.svg)](https://github.com/GuillaumeFalourd/clone-github-repo-action/actions/workflows/public-repo.yml) [![Clone Private Repository Workflow](https://github.com/GuillaumeFalourd/clone-github-repo-action/actions/workflows/private-repo.yml/badge.svg)](https://github.com/GuillaumeFalourd/clone-github-repo-action/actions/workflows/private-repo.yml)\n\n![Title](https://user-images.githubusercontent.com/22433243/117468930-900a9800-af2b-11eb-9bd4-0aa16465f952.png)\n\nGithub Action to clone a **public** or **private** Github repository and access its content on others repositories' workflows.\n\n## What changed with the action `v2` ?\n\nThis action `v2` is using a **composite action** to be compatible with all operating systems (the `v1` was using a **Dockerfile** that was only compatible with `ubuntu-*` runners).\n\n### What changed with the action `v2.1` ?\n\nYou now have a new input parameter called `depth`, which is optional and has an empty default value. If you specify a depth value when using the action, it will be passed as the value for the **--depth** parameter of the git clone command. Otherwise, the clone will be done with the default depth, which is the full history.\n\n### What changed with the action `v2.2` ?\n\nYou now have a new input parameter called `branch`, which is optional and uses `main` as default value. If you specify a branch value when using the action, it will be passed as the value for the **--branch** parameter of the git clone command.\n\n### What changed with the action `v2.3` ?\n\nYou now have a new input parameter called `submodule`, which is optional and uses `false` as default value. If you specify the submodule value when using the action as `true`, it will clone the submodule along with the repository.\n\n## How to use this action?\n\nCreate a new `.yml` file on your `.github/workflows` directory.\n\nField | Mandatory | Observation\n------------ | ------------  | -------------\n**owner** | YES | Ex: `octocat`\n**repository** | YES | Ex: `clone-github-repo-action` | \n**branch** | NO | Ex: `main` (default)\n**depth** | NO | 1 `Ex: most recent commit`\n**submodule** | NO | `false` or `true`\n**access-token** | NO | [How to create a PAT](https://docs.github.com/en/github/authenticating-to-github/creating-a-personal-access-token)\n\nYou can use one of those as reference:\n\n- [Clone Public Repo Workflow](https://github.com/GuillaumeFalourd/clone-github-repo-action/blob/main/.github/workflows/public-repo.yml)\n- [Clone Private Repo Workflow](https://github.com/GuillaumeFalourd/clone-github-repo-action/blob/main/.github/workflows/private-repo.yml)\n\n### For a public repository (with depth)\n\n```bash\n- name: Clone GuillaumeFalourd/poc-github-actions PUBLIC repository\n  uses: GuillaumeFalourd/clone-github-repo-action@v2.3\n  with:\n    depth: 1\n    branch: 'main'\n    owner: 'GuillaumeFalourd'\n    repository: 'poc-github-actions'\n```\n\n### For a private repository\n\nTo use this action to clone a `PRIVATE` repository the Github User/Admin has access to, it's necessary to create a [PERSONAL ACCESS TOKEN](https://github.com/settings/tokens) with `REPOSITORY` scopes.\n\n```bash\n- name: Clone GuillaumeFalourd/formulas-training PRIVATE repository\n  uses: GuillaumeFalourd/clone-github-repo-action@v2.3\n  with:\n    owner: 'GuillaumeFalourd'\n    repository: 'formulas-training'\n    access-token: ${{ secrets.ACCESS_TOKEN }}\n```\n\n### Access repository content\n\nAfter using this action in your workflow, you can use the following command to access the cloned repository content:\n\n```bash\ncd \u003crepository-name\u003e\n```\n\n#### Step Example\n\n```bash\n- name: Access cloned repository content\n  run: |\n    cd \u003crepository-name\u003e\n    ls -la\n```\n\n## Licensed\n\n☞ This repository uses the [Apache License 2.0](https://github.com/GuillaumeFalourd/aws-cliaction/blob/main/LICENSE)\n\n## Contributing\n\n☞ [Guidelines](https://github.com/GuillaumeFalourd/clone-github-repo-action/blob/main/CONTRIBUTING.md)\n\n\u003ca href=\"https://github.com/GuillaumeFalourd/clone-github-repo-action/graphs/contributors\"\u003e\n  \u003cimg src=\"https://contrib.rocks/image?repo=GuillaumeFalourd/clone-github-repo-action\" /\u003e\n\u003c/a\u003e\n\n(Made with [contributors-img](https://contrib.rocks))\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fguillaumefalourd%2Fclone-github-repo-action","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fguillaumefalourd%2Fclone-github-repo-action","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fguillaumefalourd%2Fclone-github-repo-action/lists"}