A buildkite plugin to commit and push results of command(s) to a remote git repository
Add the following to your pipeline.yml
:
steps:
- command: task generate
plugins:
- datumforge/git-commit#v1.0.1: ~
The default options commit all changed/added files to $BUILDKITE_BRANCH
and pushes to origin
.
An example with fully customized options:
steps:
- command: task generate
plugins:
- datumforge/git-commit#v1.0.1:
add: app/
branch: mitb
create-branch: true
ssh-sign: true
message: "Task generate output"
remote: upstream
user:
name: bender-rodriguez
email: brodriguez@datum.net
A pathspec that will be passed to git add -A
to add changed files.
The branch where changes will be committed. Since Buildkite runs builds in a detached HEAD state, this plugin will fetch and checkout the given branch prior to committing. Unless we're creating a new branch. See create-branch
When set to true the branch will be created, rather than fetched from the remote
The commit message
The git remote where changes will be pushed
If given, will configure the git user email for the repo
If given, will configure the git user name for the repo
If set to true, commits will be pushed over https
instead of ssh
. The user.name
configuration and GITHUB_TOKEN
environment variable must also be set.
If set to true, commits will include the --signoff
flag to sign commits with the ssh
key
If set to true, commits will include the --gpg-sign
flag to sign commits with the gpg
key
Requires taskfile - task lint
and task test
to validate updates to the plugin