{"id":15503265,"url":"https://github.com/johno/actions-push-subdirectories","last_synced_at":"2025-10-12T08:41:41.317Z","repository":{"id":54436483,"uuid":"186456707","full_name":"johno/actions-push-subdirectories","owner":"johno","description":"Push subdirectories in a monorepo to separate, read-only repositories","archived":false,"fork":false,"pushed_at":"2021-02-18T04:41:27.000Z","size":11,"stargazers_count":61,"open_issues_count":3,"forks_count":15,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-29T20:03:55.624Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/johno.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"license","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-05-13T16:23:43.000Z","updated_at":"2023-03-31T20:27:35.000Z","dependencies_parsed_at":"2023-01-04T21:32:18.084Z","dependency_job_id":null,"html_url":"https://github.com/johno/actions-push-subdirectories","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johno%2Factions-push-subdirectories","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johno%2Factions-push-subdirectories/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johno%2Factions-push-subdirectories/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johno%2Factions-push-subdirectories/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/johno","download_url":"https://codeload.github.com/johno/actions-push-subdirectories/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250343754,"owners_count":21415035,"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":[],"created_at":"2024-10-02T09:12:39.819Z","updated_at":"2025-10-12T08:41:41.232Z","avatar_url":"https://github.com/johno.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Push Subdirectories\n\nGitHub Action to push subdirectories to separate repositories.\n\n### Why?\n\nWhen building Gatsby Themes with a monorepo it's common to need to\nbe able to develop your corresponding starters in the same repo as\nwell. This allows you to automatically push your starters to their\nown repo so they can be used with `gatsby new`.\n\n## Usage\n\n```yml\nname: Publish Starters\non: push\njobs:\n  master:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@master\n      - name: publish:starters\n        uses: johno/actions-push-subdirectories@master\n        env:\n          API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB }}\n          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n        with:\n          args: examples johno\n```\n\nThe `GITHUB_TOKEN` will automatically be defined, the `API_TOKEN_GITHUB` needs to be set in the `Secrets` section of your repository options. You can retrieve the `API_TOKEN_GITHUB` [here](https://github.com/settings/tokens) (set the `repo` permission).\n\nThe action accepts four arguments - the first two are mandatory, the third and fourth are optional.\n\n1. Name of the folder that contains your examples. Even if you only have one example currently it also should be placed inside its own folder (e.g. `examples/foo-bar`) as the script will read all folders inside the examples.\n2. GitHub username\n3. Repository name of the respective example. By default the `name` key from the example's `package.json` is used, e.g. the `name` of your example is `gatsby-starter-foobar`, then the script will try to push to `github.com/USERNAME/gatsby-starter-foobar`.\n4. The branch name that the changes should be pushed to. Defaults to `main`. \n\n### Custom starter names\n\nYou could define the key `starter-name` in your example's `package.json`, like:\n\n```json\n{\n  \"starter-name\": \"gatsby-starter-custom-foobar\",\n}\n```\n\nUse the action with the third argument now:\n\n```yml\nargs: examples johno starter-name\n```\n\nUsing the action to push to `master` branch:\n\n```yml\nargs: examples johno starter-name master\n```\n\n## Related\n\nThis code is adapted and modified from [Gatsby core](https://github.com/gatsbyjs/gatsby/blob/8933ca9b3bf2c9b4fd580dd437d8695c3be705b7/scripts/clone-and-validate.sh).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohno%2Factions-push-subdirectories","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjohno%2Factions-push-subdirectories","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohno%2Factions-push-subdirectories/lists"}