Compare commits

...

4 Commits

Author SHA1 Message Date
Stefan Zweifel
e6db1ef8bd Release v4.1.4 2020-04-22 12:58:51 +02:00
Stefan Zweifel
d09082150e Merge pull request #62 from stefanzweifel/revert-59-no-override-global-git
Revert "Place git user configuration inline before commit"
2020-04-22 12:56:36 +02:00
Stefan Zweifel
3e578b5696 Revert "Place git user configuration inline before commit" 2020-04-22 12:55:25 +02:00
Stefan Zweifel
c586963a3d Update README 2020-04-18 10:55:30 +02:00
3 changed files with 20 additions and 6 deletions

View File

@@ -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

View File

@@ -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
```

View File

@@ -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() {