mirror of
https://github.com/stefanzweifel/git-auto-commit-action.git
synced 2025-07-30 22:46:13 +08:00
Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
e6db1ef8bd | ||
|
d09082150e | ||
|
3e578b5696 | ||
|
c586963a3d |
@@ -6,9 +6,15 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
|
||||
|
||||
## [Unreleased](https://github.com/stefanzweifel/git-auto-commit-action/compare/v4.1.3...HEAD)
|
||||
|
||||
## [v4.1.4](https://github.com/stefanzweifel/git-auto-commit-action/compare/v4.1.3...v4.1.4) - 2020-04-22
|
||||
|
||||
### Fixed
|
||||
- Fix bug introduced in previous version, where git user configuration has been placed inline [#62](https://github.com/stefanzweifel/git-auto-commit-action/pull/62)
|
||||
|
||||
|
||||
## [v4.1.3](https://github.com/stefanzweifel/git-auto-commit-action/compare/v4.1.2...v4.1.3) - 2020-04-18
|
||||
|
||||
### Changed
|
||||
### Changed
|
||||
- Place Git user configuration inline [#59](https://github.com/stefanzweifel/git-auto-commit-action/pull/59)
|
||||
|
||||
## [v4.1.2](https://github.com/stefanzweifel/git-auto-commit-action/compare/v4.1.1...v4.1.2) - 2020-04-03
|
||||
|
@@ -17,7 +17,7 @@ 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@v4.1.2
|
||||
- uses: stefanzweifel/git-auto-commit-action@v4.1.4
|
||||
with:
|
||||
commit_message: Apply automatic changes
|
||||
|
||||
@@ -74,7 +74,7 @@ jobs:
|
||||
- name: Run php-cs-fixer
|
||||
uses: docker://oskarstark/php-cs-fixer-ga
|
||||
|
||||
- uses: stefanzweifel/git-auto-commit-action@v4.1.2
|
||||
- uses: stefanzweifel/git-auto-commit-action@v4.1.4
|
||||
with:
|
||||
commit_message: Apply php-cs-fixer changes
|
||||
branch: ${{ github.head_ref }}
|
||||
@@ -97,7 +97,7 @@ jobs:
|
||||
- name: Run php-cs-fixer
|
||||
uses: docker://oskarstark/php-cs-fixer-ga
|
||||
|
||||
- uses: stefanzweifel/git-auto-commit-action@v4.1.2
|
||||
- uses: stefanzweifel/git-auto-commit-action@v4.1.4
|
||||
with:
|
||||
commit_message: Apply php-cs-fixer changes
|
||||
```
|
||||
@@ -145,7 +145,7 @@ jobs:
|
||||
- name: Run php-cs-fixer
|
||||
uses: docker://oskarstark/php-cs-fixer-ga
|
||||
|
||||
- uses: stefanzweifel/git-auto-commit-action@v4.1.2
|
||||
- uses: stefanzweifel/git-auto-commit-action@v4.1.4
|
||||
with:
|
||||
commit_message: Apply php-cs-fixer changes
|
||||
```
|
||||
|
@@ -9,6 +9,8 @@ _main() {
|
||||
|
||||
echo "::set-output name=changes_detected::true"
|
||||
|
||||
_setup_git
|
||||
|
||||
_switch_to_branch
|
||||
|
||||
_add_files
|
||||
@@ -36,6 +38,12 @@ _git_is_dirty() {
|
||||
[ -n "$(git status -s)" ]
|
||||
}
|
||||
|
||||
# Set up git user configuration
|
||||
_setup_git ( ) {
|
||||
git config --global user.name "$INPUT_COMMIT_USER_NAME"
|
||||
git config --global user.email "$INPUT_COMMIT_USER_EMAIL"
|
||||
}
|
||||
|
||||
_switch_to_branch() {
|
||||
echo "INPUT_BRANCH value: $INPUT_BRANCH";
|
||||
|
||||
@@ -50,7 +58,7 @@ _add_files() {
|
||||
|
||||
_local_commit() {
|
||||
echo "INPUT_COMMIT_OPTIONS: ${INPUT_COMMIT_OPTIONS}"
|
||||
git -c user.name="$INPUT_COMMIT_USER_NAME" -c user.email="$INPUT_COMMIT_USER_EMAIL" commit -m "$INPUT_COMMIT_MESSAGE" --author="$INPUT_COMMIT_AUTHOR" ${INPUT_COMMIT_OPTIONS:+"$INPUT_COMMIT_OPTIONS"}
|
||||
git commit -m "$INPUT_COMMIT_MESSAGE" --author="$INPUT_COMMIT_AUTHOR" ${INPUT_COMMIT_OPTIONS:+"$INPUT_COMMIT_OPTIONS"}
|
||||
}
|
||||
|
||||
_tag_commit() {
|
||||
|
Reference in New Issue
Block a user