mirror of
https://github.com/stefanzweifel/git-auto-commit-action.git
synced 2025-08-03 09:06:08 +08:00
Compare commits
10 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
480e111bf8 | ||
|
7659782c71 | ||
|
026f88c27c | ||
|
f73d11d461 | ||
|
2b6b90e8f1 | ||
|
e1770ec52b | ||
|
0453bb1c25 | ||
|
da55e4a0cf | ||
|
b1833bd054 | ||
|
6dfda22dd6 |
@@ -4,9 +4,12 @@ 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/)
|
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).
|
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/v4.1.0...HEAD)
|
## [Unreleased](https://github.com/stefanzweifel/git-auto-commit-action/compare/v4.1.1...HEAD)
|
||||||
|
|
||||||
> TBD
|
## [v4.1.1](https://github.com/stefanzweifel/git-auto-commit-action/compare/v4.1.1...v4.1.1) - 2020-03-14
|
||||||
|
|
||||||
|
### Fixes
|
||||||
|
- Fix issue where commit has not been pushed to remote repository, when no `branch`-option has been given [#54](https://github.com/stefanzweifel/git-auto-commit-action/pull/54)
|
||||||
|
|
||||||
|
|
||||||
## [v4.1.0](https://github.com/stefanzweifel/git-auto-commit-action/compare/v4.0.0...v4.1.0) - 2020-03-05
|
## [v4.1.0](https://github.com/stefanzweifel/git-auto-commit-action/compare/v4.0.0...v4.1.0) - 2020-03-05
|
||||||
|
10
README.md
10
README.md
@@ -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.
|
Add the following step at the end of your job.
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- uses: stefanzweifel/git-auto-commit-action@v4.1.0
|
- uses: stefanzweifel/git-auto-commit-action@v4.1.1
|
||||||
with:
|
with:
|
||||||
commit_message: Apply automatic changes
|
commit_message: Apply automatic changes
|
||||||
|
|
||||||
@@ -37,7 +37,7 @@ Add the following step at the end of your job.
|
|||||||
# Optional commit user and author settings
|
# Optional commit user and author settings
|
||||||
commit_user_name: My GitHub Actions Bot
|
commit_user_name: My GitHub Actions Bot
|
||||||
commit_user_email: my-github-actions-bot@example.org
|
commit_user_email: my-github-actions-bot@example.org
|
||||||
commit_author: Author <actions@gitub.com>
|
commit_author: Author <actions@github.com>
|
||||||
|
|
||||||
# Optional tag message. Will create and push a new tag to the remote repository
|
# Optional tag message. Will create and push a new tag to the remote repository
|
||||||
tagging_message: 'v1.0.0'
|
tagging_message: 'v1.0.0'
|
||||||
@@ -74,7 +74,7 @@ jobs:
|
|||||||
- name: Run php-cs-fixer
|
- name: Run php-cs-fixer
|
||||||
uses: docker://oskarstark/php-cs-fixer-ga
|
uses: docker://oskarstark/php-cs-fixer-ga
|
||||||
|
|
||||||
- uses: stefanzweifel/git-auto-commit-action@v4.1.0
|
- uses: stefanzweifel/git-auto-commit-action@v4.1.1
|
||||||
with:
|
with:
|
||||||
commit_message: Apply php-cs-fixer changes
|
commit_message: Apply php-cs-fixer changes
|
||||||
branch: ${{ github.head_ref }}
|
branch: ${{ github.head_ref }}
|
||||||
@@ -97,7 +97,7 @@ jobs:
|
|||||||
- name: Run php-cs-fixer
|
- name: Run php-cs-fixer
|
||||||
uses: docker://oskarstark/php-cs-fixer-ga
|
uses: docker://oskarstark/php-cs-fixer-ga
|
||||||
|
|
||||||
- uses: stefanzweifel/git-auto-commit-action@v4.1.0
|
- uses: stefanzweifel/git-auto-commit-action@v4.1.1
|
||||||
with:
|
with:
|
||||||
commit_message: Apply php-cs-fixer changes
|
commit_message: Apply php-cs-fixer changes
|
||||||
```
|
```
|
||||||
@@ -145,7 +145,7 @@ jobs:
|
|||||||
- name: Run php-cs-fixer
|
- name: Run php-cs-fixer
|
||||||
uses: docker://oskarstark/php-cs-fixer-ga
|
uses: docker://oskarstark/php-cs-fixer-ga
|
||||||
|
|
||||||
- uses: stefanzweifel/git-auto-commit-action@v4.1.0
|
- uses: stefanzweifel/git-auto-commit-action@v4.1.1
|
||||||
with:
|
with:
|
||||||
commit_message: Apply php-cs-fixer changes
|
commit_message: Apply php-cs-fixer changes
|
||||||
```
|
```
|
||||||
|
@@ -67,13 +67,22 @@ _tag_commit() {
|
|||||||
if [ -n "$INPUT_TAGGING_MESSAGE" ]
|
if [ -n "$INPUT_TAGGING_MESSAGE" ]
|
||||||
then
|
then
|
||||||
git tag -a "$INPUT_TAGGING_MESSAGE" -m "$INPUT_TAGGING_MESSAGE"
|
git tag -a "$INPUT_TAGGING_MESSAGE" -m "$INPUT_TAGGING_MESSAGE"
|
||||||
|
else
|
||||||
|
echo " No tagging message supplied. No tag will be added."
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
_push_to_github() {
|
_push_to_github() {
|
||||||
if [ -z "$INPUT_BRANCH" ]
|
if [ -z "$INPUT_BRANCH" ]
|
||||||
|
then
|
||||||
|
# Only add `--tags` option, if `$INPUT_TAGGING_MESSAGE` is set
|
||||||
|
if [ -n "$INPUT_TAGGING_MESSAGE" ]
|
||||||
then
|
then
|
||||||
git push origin --tags
|
git push origin --tags
|
||||||
|
else
|
||||||
|
git push origin
|
||||||
|
fi
|
||||||
|
|
||||||
else
|
else
|
||||||
git push --set-upstream origin "HEAD:$INPUT_BRANCH" --tags
|
git push --set-upstream origin "HEAD:$INPUT_BRANCH" --tags
|
||||||
fi
|
fi
|
||||||
|
Reference in New Issue
Block a user