Skip to content
git-commit

GitHub Action

Create Commit

v0.1.0 Latest version

Create Commit

git-commit

Create Commit

Commit and push files to a repository

Installation

Copy and paste the following snippet into your .yml file.

              

- name: Create Commit

uses: wranders/commit-action@v0.1.0

Learn more about this action in wranders/commit-action

Choose a version

commit-action

Commit and push files to a repository

Inputs

branch

Target branch files will be committed to. Defaults to the checked out branch.

delete_files

A newline-delimited list of files to delete in this commit. Files that are not on the target branch are logged and ignored.

files

Required: A newline-delimited list of files add or modify in this commit. Files listed that are not modified will no appear in the commit.

message

Commit message. Default:

committed files

created  [ list of created files ]
modified [ list of modified files ]
deleted  [ list of deleted files ]

message_file

A text file containing the commit message. Fails if file does not exist.

repository

The repository to commit files to. Must be formatted as 'OWNER/REPOSITORY'. Defaults to env.GITHUB_REPOSITORY.

token

The token used to interact with the Github API. Defaults to env.GITHUB_TOKEN

Example Usage

jobs:
  run:
    steps:
    - uses: wranders/commit-action@v0
      with:
        message: Update README
        files: |
          README.md