finds.dev← search

// the find

EndBug/add-and-commit

★ 1,280 · TypeScript · MIT · updated Jun 2026

:octocat: Automatically commit changes made in your workflow run directly to your repo

A GitHub Action that stages and commits files back to your repo from within a workflow run. Useful for workflows that auto-generate or modify files — linting with auto-fix, updating changelogs, committing build artifacts, etc. It wraps `git add`, `git rm`, `git commit`, and `git push` with a thin TypeScript layer.

The output variables (`committed`, `pushed`, `commit_long_sha`) let downstream steps branch on whether anything actually changed, which prevents empty commit noise. Author/committer identity is configurable across three sensible presets, covering the main reasons you'd want to customize it. The `pathspec_error_handling` option is a small but practical detail — most similar actions just silently fail or hard-crash on unmatched globs. Active maintenance with v10 and community contributions suggest it tracks GitHub Actions API changes.

Git arguments are parsed via `string-argv` and piped to `simple-git`, not the actual CLI — nested or complex quoting will bite you in non-obvious ways, and the README acknowledges this. The 'commits from CI don't trigger CI' behavior is a footgun that the docs correctly explain, but the only fix (using a PAT) introduces its own security surface. No built-in support for GPG-signed commits. The action has no way to batch multiple unrelated file patterns into a single atomic commit without workarounds like JSON-encoded array inputs, which is awkward to read in workflow YAML.

View on GitHub →

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →