{"id":25543460,"url":"https://github.com/suzuki-shunsuke/commit-action","last_synced_at":"2026-01-12T09:39:21.941Z","repository":{"id":275923567,"uuid":"927615706","full_name":"suzuki-shunsuke/commit-action","owner":"suzuki-shunsuke","description":"GitHub Action to push changes to remote branches by GitHub API. You can create verified commits using GitHub App.","archived":false,"fork":false,"pushed_at":"2026-01-11T16:45:59.000Z","size":2830,"stargazers_count":23,"open_issues_count":8,"forks_count":6,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-11T19:45:30.587Z","etag":null,"topics":["github-actions","oss"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/suzuki-shunsuke.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-02-05T08:55:02.000Z","updated_at":"2026-01-11T16:45:41.000Z","dependencies_parsed_at":"2025-02-05T10:30:32.125Z","dependency_job_id":"4d10ccac-e582-4e15-b502-15af3bcce605","html_url":"https://github.com/suzuki-shunsuke/commit-action","commit_stats":null,"previous_names":["suzuki-shunsuke/commit-action"],"tags_count":16,"template":false,"template_full_name":null,"purl":"pkg:github/suzuki-shunsuke/commit-action","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/suzuki-shunsuke%2Fcommit-action","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/suzuki-shunsuke%2Fcommit-action/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/suzuki-shunsuke%2Fcommit-action/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/suzuki-shunsuke%2Fcommit-action/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/suzuki-shunsuke","download_url":"https://codeload.github.com/suzuki-shunsuke/commit-action/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/suzuki-shunsuke%2Fcommit-action/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28337739,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-12T06:09:07.588Z","status":"ssl_error","status_checked_at":"2026-01-12T06:05:18.301Z","response_time":98,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["github-actions","oss"],"created_at":"2025-02-20T07:19:32.386Z","updated_at":"2026-01-12T09:39:21.934Z","avatar_url":"https://github.com/suzuki-shunsuke.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# commit-action\n\n[![DeepWiki](https://img.shields.io/badge/Ask_DeepWiki-000000.svg?logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACwAAAAyCAYAAAAnWDnqAAAAAXNSR0IArs4c6QAAA05JREFUaEPtmUtyEzEQhtWTQyQLHNak2AB7ZnyXZMEjXMGeK/AIi+QuHrMnbChYY7MIh8g01fJoopFb0uhhEqqcbWTp06/uv1saEDv4O3n3dV60RfP947Mm9/SQc0ICFQgzfc4CYZoTPAswgSJCCUJUnAAoRHOAUOcATwbmVLWdGoH//PB8mnKqScAhsD0kYP3j/Yt5LPQe2KvcXmGvRHcDnpxfL2zOYJ1mFwrryWTz0advv1Ut4CJgf5uhDuDj5eUcAUoahrdY/56ebRWeraTjMt/00Sh3UDtjgHtQNHwcRGOC98BJEAEymycmYcWwOprTgcB6VZ5JK5TAJ+fXGLBm3FDAmn6oPPjR4rKCAoJCal2eAiQp2x0vxTPB3ALO2CRkwmDy5WohzBDwSEFKRwPbknEggCPB/imwrycgxX2NzoMCHhPkDwqYMr9tRcP5qNrMZHkVnOjRMWwLCcr8ohBVb1OMjxLwGCvjTikrsBOiA6fNyCrm8V1rP93iVPpwaE+gO0SsWmPiXB+jikdf6SizrT5qKasx5j8ABbHpFTx+vFXp9EnYQmLx02h1QTTrl6eDqxLnGjporxl3NL3agEvXdT0WmEost648sQOYAeJS9Q7bfUVoMGnjo4AZdUMQku50McDcMWcBPvr0SzbTAFDfvJqwLzgxwATnCgnp4wDl6Aa+Ax283gghmj+vj7feE2KBBRMW3FzOpLOADl0Isb5587h/U4gGvkt5v60Z1VLG8BhYjbzRwyQZemwAd6cCR5/XFWLYZRIMpX39AR0tjaGGiGzLVyhse5C9RKC6ai42ppWPKiBagOvaYk8lO7DajerabOZP46Lby5wKjw1HCRx7p9sVMOWGzb/vA1hwiWc6jm3MvQDTogQkiqIhJV0nBQBTU+3okKCFDy9WwferkHjtxib7t3xIUQtHxnIwtx4mpg26/HfwVNVDb4oI9RHmx5WGelRVlrtiw43zboCLaxv46AZeB3IlTkwouebTr1y2NjSpHz68WNFjHvupy3q8TFn3Hos2IAk4Ju5dCo8B3wP7VPr/FGaKiG+T+v+TQqIrOqMTL1VdWV1DdmcbO8KXBz6esmYWYKPwDL5b5FA1a0hwapHiom0r/cKaoqr+27/XcrS5UwSMbQAAAABJRU5ErkJggg==)](https://deepwiki.com/suzuki-shunsuke/commit-action)\n[![License](http://img.shields.io/badge/license-mit-blue.svg?style=flat-square)](https://raw.githubusercontent.com/suzuki-shunsuke/commit-action/main/LICENSE) [action.yaml](action.yaml)\n\ncommit-action is a GitHub Action to push changes to remote branches by GitHub API.\nYou can create **verified** commits using GitHub App.\n\n\u003cimg width=\"870\" alt=\"image\" src=\"https://github.com/user-attachments/assets/e9f3880c-1c4e-47e5-a376-13bc25620089\" /\u003e\n\n## Blog posts\n\n- [2025-02-15 GitHub Actions で Verified Commit でコードを自動修正](https://zenn.dev/shunsuke_suzuki/articles/commit-action)\n- [2025-02-15 Fix Code Via GitHub Actions By Verified Commits](https://dev.to/suzukishunsuke/fix-code-via-github-actions-by-verified-commits-3o1d)\n\n## Why Use commit-action?\n\nUnlike similar actions, **commit-action creates and pushes commits by GitHub API instead of Git commands**.\nSo you can create **verified commits** using GitHub Actions token `${{github.token}}` or a GitHub App installation access token.\n\nCommit signing is so important for security.\n\nhttps://docs.github.com/en/authentication/managing-commit-signature-verification\n\nTo create verified commits using Git, a GPG key or SSH key is required.\nIt's bothersome to manage GPG keys and SSH keys properly for automation, so it's awesome that commit-action can create verified commits without them.\n\n## GitHub Access Token\n\nYou can use the following things:\n\n- :thumbsup: GitHub App Installation access token: We recommend this\n- :thumbsdown: GitHub Personal Access Token: This can't create verified commits\n- :thumbsdown: `${{secrets.GITHUB_TOKEN}}`: This can't trigger new workflow runs.\n\nhttps://docs.github.com/en/actions/security-for-github-actions/security-guides/automatic-token-authentication#using-the-github_token-in-a-workflow\n\n\u003e When you use the repository's GITHUB_TOKEN to perform tasks, events triggered by the GITHUB_TOKEN, with the exception of workflow_dispatch and repository_dispatch, will not create a new workflow run.\n\n### Required permissions\n\n`contents:write` is required.\nFurthermore, if you want to fix workflow files, `workflows:write` is also required.\n\n## How To Use\n\ncommit-action is so easy to use.\nAll inputs are optional.\n\nYou only need to run commit-action after fixing code in workflows.\nThen it creates and pushes a commit to a remote branch.\n\n```yaml\nname: Example\non:\n  pull_request: {}\njobs:\n  example:\n    runs-on: ubuntu-24.04\n    steps:\n      - name: Checkout\n        uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1\n        with:\n          persist-credentials: false\n\n      # Fix files\n      # ...\n\n      - name: Push changes to the remote branch\n        uses: suzuki-shunsuke/commit-action@f28421acc277a6d6a9c1f94ea449076ad77dba67 # v0.1.0\n```\n\ncommit-action fails if it pushes a commit to `${GITHUB_HEAD_REF:-${GITHUB_REF_NAME}}` in `$GITHUB_REPOSITORY`.\nIf you want to continue without failing, set `fail_on_self_push: false` and check outputs instead (see `self_push`).\nIf no change is pushed, commit-action does nothing and exits successfully.\n\n### branch, repository\n\nBy default, commit-action pushes a commit to `${GITHUB_HEAD_REF:-${GITHUB_REF_NAME}}` in `$GITHUB_REPOSITORY`, but you can change them.\n\n```yaml\n- uses: suzuki-shunsuke/commit-action@f28421acc277a6d6a9c1f94ea449076ad77dba67 # v0.1.0\n  with:\n    branch: foo\n    repository: suzuki-shunsuke/tfcmt\n```\n\n### parent branch\n\nIf a new branch is created, the parent branch is the default branch by default.\nYou can specify the paretn branch.\n\n```yaml\n- uses: suzuki-shunsuke/commit-action@f28421acc277a6d6a9c1f94ea449076ad77dba67 # v0.1.0\n  with:\n    branch: foo-2\n    parent_branch: foo\n```\n\n### GitHub Access token\n\n`${{github.token}}` is used by default, but we don't recommend it because `${{github.token}}` doesn't trigger a new workflow run.\nWe recommend GitHub App installation access tokens.\nYou can create a GitHub App installation access token and pass it to commit-action yourself, but you can also pass a pair of GitHub App ID and private key.\nThen commit-action creates a GitHub App installation access token with minimum `repositories` and `permissions`.\n\n```yaml\n- uses: suzuki-shunsuke/commit-action@f28421acc277a6d6a9c1f94ea449076ad77dba67 # v0.1.0\n  with:\n    app_id: ${{secrets.APP_ID}}\n    app_private_key: ${{secrets.APP_PRIVATE_KEY}}\n```\n\n### Which Files To Be Committed\n\nBy default, commit-action lists all added, modified, and deleted files by `git ls-files --modified --others --exclude-standard` in `root_dir` (The default is `.`).\nThe input `files` is used as arguments of `git ls-files`.\nIf the input `list_files_by_git` is set to `false` (the default is `true`), the action uses the input `files` as files to be committed without `git ls-files`.\nThe repository needs to be checked out before using commit-action unless `list_files_by_git` is set to `false`.\nThe input `files` is a list of relative paths from `root_dir`.\n\ne.g.\n\n```yaml\n- uses: suzuki-shunsuke/commit-action@f28421acc277a6d6a9c1f94ea449076ad77dba67 # v0.1.0\n  with:\n    files: |\n      README.md\n      package-lock.json\n```\n\n### fail_on_self_push\n\n[#204](https://github.com/suzuki-shunsuke/commit-action/pull/204) By default, commit-action fails when a commit is pushed to the same repo and branch as the current workflow run.\nWhen the input `fail_on_self_push` is set to `false` (the default is `true`), the action succeeds in this case.\n\n```yaml\n- uses: suzuki-shunsuke/commit-action@f28421acc277a6d6a9c1f94ea449076ad77dba67 # v0.1.0\n  with:\n    fail_on_self_push: false # continue without failing when self-pushing\n```\n\n### Outputs\n\n- `pushed`: true if a commit was pushed.\n- `sha`: the pushed commit SHA (empty if none).\n- `self_push`: true if a commit was pushed to the same repo/branch as the current workflow run.\n\n### Fix workflow files\n\nIf you want to fix workflow files, the permission `workflows:write` is required.\nThe input `workflow` changes the behaviour when workflow files are changed.\nThe input is used if `app_id` and `app_private_key` are passed.\nThe following values are available:\n\n1. `allow` (default) - Grant workflows:write permission when issuing an access token\n1. `deny` - Fail if workflow files are changed\n1. `ignore` - Ignore workflow files\n\n```yaml\n- uses: suzuki-shunsuke/commit-action@f28421acc277a6d6a9c1f94ea449076ad77dba67 # v0.1.0\n  with:\n    workflow: ignore # allow (default), deny\n```\n\n## Available versions\n\ncommit-action's main branch and feature branches don't work.\n[Please see the document](https://github.com/suzuki-shunsuke/release-js-action/blob/main/docs/available_versions.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsuzuki-shunsuke%2Fcommit-action","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsuzuki-shunsuke%2Fcommit-action","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsuzuki-shunsuke%2Fcommit-action/lists"}