Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: update readme to refer to the github action #35

Merged
merged 1 commit into from
Aug 31, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 10 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,19 @@

Use GitHub's GraphQL API `createCommitOnBranch` mutation to commit files to a GitHub repository.

## Why?

Enable keyless signing.
There is a companion GitHub Action in the the [ghcommit-action](https://github.com/planetscale/ghcommit-action) repo.

Commits made within a CI environment like GitHub Actions using the `git` cli line will not
be signed. By using the API, commits are signed with GitHub's GPG key.
## Why?

This method allows for signed commits in a CI environment without needing to manage private
GPG keys. This is important for repositories that require signed commits as part of their
branch protection.
Enable keyless signing in CI environments. Especially useful for repos which require signed commits and have
CI worklows that commit back to the repo (eg: code formatters, generators, etc).

It is possible to sign commits with GPG, however managing GPG keys can be cumbersome,
especially when maintainers leave a project. Using the API eliminates the need for key management.
Normally in order to sign commits from within a CI pipeline you would need to setup and manage GPG or SSH keys
in the CI pipeline. And you take on the risk of those keys be copied by developers with access to the CI environment.
The keys will need to be rotated as people leave the team or keys expire. Using `ghcommit` instead uses the GitHub
GraphQL API to make git commits which are signed by GitHub's web flow GPG key.

:warning: This is meant for use in CI environments and with small commits. For example, a CI workflow
> :warning: This is meant for use in CI environments and with small commits. For example, a CI workflow
that formats code and commits the changes. This is not meant to be used for large commits
and should not be used in place of `git` for day-to-day development.

Expand Down Expand Up @@ -66,4 +64,4 @@ Refer to the autotag [docs](https://github.com/pantheon-systems/autotag#incremen
for more details.

Include `[skip ci]` in the commit message to prevent a new version from being released. Only use this
for things like documentation updates.
for things like documentation updates.
Loading