{"id":16275794,"url":"https://github.com/dicook/github-action-push-to-another-repository","last_synced_at":"2025-04-08T16:42:19.440Z","repository":{"id":145752936,"uuid":"472125483","full_name":"dicook/github-action-push-to-another-repository","owner":"dicook","description":null,"archived":false,"fork":false,"pushed_at":"2022-11-29T06:23:10.000Z","size":7,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-14T13:17:49.719Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/dicook.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-03-20T23:12:26.000Z","updated_at":"2022-03-23T23:19:51.000Z","dependencies_parsed_at":null,"dependency_job_id":"58f9b0b4-852b-4491-8a72-63756df45c9c","html_url":"https://github.com/dicook/github-action-push-to-another-repository","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dicook%2Fgithub-action-push-to-another-repository","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dicook%2Fgithub-action-push-to-another-repository/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dicook%2Fgithub-action-push-to-another-repository/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dicook%2Fgithub-action-push-to-another-repository/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dicook","download_url":"https://codeload.github.com/dicook/github-action-push-to-another-repository/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247886396,"owners_count":21012834,"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-10T18:36:25.535Z","updated_at":"2025-04-08T16:42:19.418Z","avatar_url":"https://github.com/dicook.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# github-action-push-to-another-repository\n\nUsed to push generated files from a directory from Git Action step into another repository on Github.\n\nE.g.\nRepository pandoc-test contains Markdown and a Git Action to generate, using Pandoc, an output: HTML, PDF, odt, epub, etc.\n\nRepository pandoc-test-output: contains only the generated files from the first Git Action. Pushed here with github-action-push-to-another-repository\n\nAnd pandoc-test-output can have Git Pages to give access to the files (or just links to the raw version of the files)\n\n## Inputs\n### `source-directory` (argument)\nFrom the repository that this Git Action is executed the directory that contains the files to be pushed into the repository.\n\n### `destination-github-username` (argument)\nFor the repository `https://github.com/cpina/push-to-another-repository-output` is `cpina`. It's also used for the `Author:` in the generated git messages.\n\n### `destination-repository-name` (argument)\nFor the repository `https://github.com/cpina/push-to-another-repository-output` is `push-to-another-repository-output`\n\n### `user-email` (argument)\nThe email that will be used for the commit in the destination-repository-name.\n\n### `API_TOKEN_GITHUB` (environment)\nE.g.:\n  `API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB }}`\n\nGenerate your personal token following the steps:\n* Go to the Github Settings (on the right hand side on the profile picture)\n* On the left hand side pane click on \"Developer Settings\"\n* Click on \"Personal Access Tokens\" (also available at https://github.com/settings/tokens)\n* Generate a new token, choose \"Repo\". Copy the token.\n\nThen make the token available to the Github Action following the steps:\n* Go to the Github page for the repository that you push from, click on \"Settings\"\n* On the left hand side pane click on \"Secrets\"\n* Click on \"Add a new secret\" and name it \"API_TOKEN_GITHUB\"\n\n## Example usage\n```yaml\n      - name: Pushes to another repository\n        uses: cpina/github-action-push-to-another-repository@master\n        env:\n          API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB }}\n        with:\n          source-directory: 'output'\n          destination-github-username: 'cpina'\n          destination-repository-name: 'pandoc-test-output'\n          user-email: carles3@pina.cat\n```\n\nWorking example:\n\nhttps://github.com/cpina/push-to-another-repository-example/blob/master/.github/workflows/ci.yml\n\nIt generates files from:\nhttps://github.com/cpina/push-to-another-repository-example\n\nTo:\nhttps://github.com/cpina/push-to-another-repository-output\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdicook%2Fgithub-action-push-to-another-repository","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdicook%2Fgithub-action-push-to-another-repository","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdicook%2Fgithub-action-push-to-another-repository/lists"}