mirror of
https://github.com/stefanzweifel/git-auto-commit-action.git
synced 2025-08-01 07:56:08 +08:00
Compare commits
21 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
3ffeab2fe0 | ||
|
5adbb8cb3e | ||
|
97f9868da0 | ||
|
8a0c95d76c | ||
|
4c6d2819f0 | ||
|
7fec5eda4a | ||
|
6c17ba31a9 | ||
|
6f1c9227f5 | ||
|
72e2d4cb1e | ||
|
8cc484cbc5 | ||
|
ed0ebb9072 | ||
|
0b91625aed | ||
|
ba1c2a6047 | ||
|
12282205b7 | ||
|
ef8610f6df | ||
|
f4fd59c4d4 | ||
|
ea88bd7cde | ||
|
80f825a9bc | ||
|
845dc426e7 | ||
|
fcfae8cf7e | ||
|
ef125417f8 |
16
CHANGELOG.md
16
CHANGELOG.md
@@ -4,11 +4,23 @@ All notable changes to this project will be documented in this file.
|
||||
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
|
||||
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## [Unreleased](https://github.com/stefanzweifel/git-auto-commit-action/compare/v2.0.0...HEAD)
|
||||
## [Unreleased](https://github.com/stefanzweifel/git-auto-commit-action/compare/v2.1.0...HEAD)
|
||||
|
||||
## [v2.1.0](https://github.com/stefanzweifel/git-auto-commit-action/compare/v2.0.0...v2.1.0) - 2019-09-20
|
||||
|
||||
### Added
|
||||
- Add `branch`-argument to determine, to which branch changes should be pushed. See README for usage details.
|
||||
|
||||
### Fixed
|
||||
- Fixes Issue where changes couldn't be pushed to GitHub due to wrong ref-name.
|
||||
|
||||
### Removed
|
||||
- Remove `commit_author_email` and `commit_author_name` arguments. The `$GITHUB_ACTOR` is now used as the Git Author
|
||||
|
||||
|
||||
## [v2.0.0](https://github.com/stefanzweifel/git-auto-commit-action/compare/v1.0.0...v2.0.0) - 2019-08-31
|
||||
|
||||
### Changes
|
||||
### Changed
|
||||
- Make Action Compatible with latest beta of GitHub Actions [#3](https://github.com/stefanzweifel/git-auto-commit-action/pull/3)
|
||||
|
||||
|
||||
|
13
README.md
13
README.md
@@ -13,11 +13,10 @@ This Action has been inspired and adapted from the [auto-commit](https://github.
|
||||
Add the following step at the end of your job.
|
||||
|
||||
```yaml
|
||||
- uses: stefanzweifel/git-auto-commit-action@dev
|
||||
- uses: stefanzweifel/git-auto-commit-action@v2.0.0
|
||||
with:
|
||||
commit_author_email: john.doe@example.com
|
||||
commit_author_name: John Doe
|
||||
commit_message: Apply automatic changes
|
||||
branch: ${{ github.head_ref }}
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
```
|
||||
@@ -29,9 +28,8 @@ The Action will only commit files back, if changes are available. The resulting
|
||||
|
||||
The following inputs are required
|
||||
|
||||
- `commit_author_email`: The commit message used when changes are available
|
||||
- `commit_author_name`: The Commit Authors Email Address
|
||||
- `commit_message`: The Commit Authors Name
|
||||
- `commit_message`: The commit message used when changes are available
|
||||
- `branch`: Branch name where changes should be pushed to
|
||||
|
||||
### Environment Variables
|
||||
|
||||
@@ -63,9 +61,8 @@ jobs:
|
||||
- name: Commit changed files
|
||||
uses: stefanzweifel/git-auto-commit-action@v2.0.0
|
||||
with:
|
||||
commit_author_email: hello@stefanzweifel.io
|
||||
commit_author_name: Stefan Zweifel
|
||||
commit_message: Apply php-cs-fixer changes
|
||||
branch: ${{ github.head_ref }}
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
|
@@ -5,13 +5,10 @@ author: Stefan Zweifel <hello@stefanzweifel.io>
|
||||
|
||||
inputs:
|
||||
commit_message:
|
||||
description: 'Commit message'
|
||||
description: Commit message
|
||||
required: true
|
||||
commit_author_name:
|
||||
description: 'Name of the commit author'
|
||||
required: true
|
||||
commit_author_email:
|
||||
description: 'Email address of the commit author'
|
||||
branch:
|
||||
description: Branch where changes should be pushed too
|
||||
required: true
|
||||
|
||||
runs:
|
||||
|
@@ -25,14 +25,16 @@ if ! git diff --quiet
|
||||
then
|
||||
git_setup
|
||||
|
||||
echo "INPUT_BRANCH value: $INPUT_BRANCH";
|
||||
|
||||
# Switch to branch from current Workflow run
|
||||
git checkout "${GITHUB_REF:11}"
|
||||
git checkout $INPUT_BRANCH
|
||||
|
||||
git add .
|
||||
|
||||
git commit -m "$INPUT_COMMIT_MESSAGE" --author="$INPUT_COMMIT_AUTHOR_NAME <$INPUT_COMMIT_AUTHOR_EMAIL>"
|
||||
git commit -m "$INPUT_COMMIT_MESSAGE" --author="$GITHUB_ACTOR <$GITHUB_ACTOR@users.noreply.github.com>"
|
||||
|
||||
git push --set-upstream origin "${GITHUB_REF:11}"
|
||||
git push --set-upstream origin "HEAD:$INPUT_BRANCH"
|
||||
else
|
||||
echo "Working tree clean. Nothing to commit."
|
||||
fi
|
||||
|
Reference in New Issue
Block a user