Skip to content

Commit 28e16e8

Browse files
Release preparations for v7 (#394)
1 parent 698fd76 commit 28e16e8

File tree

6 files changed

+56
-49
lines changed

6 files changed

+56
-49
lines changed

.github/workflows/update-changelog.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
latest-version: ${{ github.event.release.name }}
2828

2929
- name: Commit updated CHANGELOG
30-
uses: stefanzweifel/git-auto-commit-action@v6
30+
uses: stefanzweifel/git-auto-commit-action@v7
3131
with:
3232
branch: master
3333
commit_message: Update CHANGELOG

README.md

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Adding git-auto-commit to your Workflow only takes a couple lines of code.
1919
2. Add the following step at the end of your job, after other steps that might add or change files.
2020

2121
```yaml
22-
- uses: stefanzweifel/git-auto-commit-action@v6
22+
- uses: stefanzweifel/git-auto-commit-action@v7
2323
```
2424
2525
Your Workflow should look similar to this example.
@@ -39,15 +39,15 @@ jobs:
3939
contents: write
4040

4141
steps:
42-
- uses: actions/checkout@v4
42+
- uses: actions/checkout@v5
4343
with:
4444
ref: ${{ github.head_ref }}
4545

4646
# Other steps that change files in the repository go here
4747
#
4848

4949
# Commit all changed files back to the repository
50-
- uses: stefanzweifel/git-auto-commit-action@v6
50+
- uses: stefanzweifel/git-auto-commit-action@v7
5151
```
5252
5353
> [!NOTE]
@@ -56,7 +56,7 @@ jobs:
5656
The following is an extended example with all available options.
5757

5858
```yaml
59-
- uses: stefanzweifel/git-auto-commit-action@v6
59+
- uses: stefanzweifel/git-auto-commit-action@v7
6060
with:
6161
# Optional. Commit message for the created commit.
6262
# Defaults to "Apply automatic changes"
@@ -88,11 +88,11 @@ The following is an extended example with all available options.
8888

8989
# Optional. Tag name to be created in the local repository and
9090
# pushed to the remote repository on the defined branch.
91-
# If only one of `tag` or `tagging_message` is provided, the value of the provided field will be used for both tag name and message.
92-
tag: 'v1.0.0'
91+
# If only one of `tag_name` or `tagging_message` is provided, the value of the provided field will be used for both tag name and message.
92+
tag_name: 'v1.0.0'
9393

9494
# Optional. Message to annotate the created tag with.
95-
# If only one of `tag` or `tagging_message` is provided, the value of the provided field will be used for both tag name and message.
95+
# If only one of `tag_name` or `tagging_message` is provided, the value of the provided field will be used for both tag name and message.
9696
tagging_message: 'Codename "Sunshine"'
9797

9898
# Optional. Option used by `git-status` to determine if the repository is
@@ -155,14 +155,14 @@ jobs:
155155
contents: write
156156
157157
steps:
158-
- uses: actions/checkout@v4
158+
- uses: actions/checkout@v5
159159
with:
160160
ref: ${{ github.head_ref }}
161161
162162
- name: Run php-cs-fixer
163163
uses: docker://oskarstark/php-cs-fixer-ga
164164
165-
- uses: stefanzweifel/git-auto-commit-action@v6
165+
- uses: stefanzweifel/git-auto-commit-action@v7
166166
with:
167167
commit_message: Apply php-cs-fixer changes
168168
```
@@ -184,7 +184,7 @@ You can use these outputs to trigger other Actions in your Workflow run based on
184184
### Example
185185

186186
```yaml
187-
- uses: stefanzweifel/git-auto-commit-action@v6
187+
- uses: stefanzweifel/git-auto-commit-action@v7
188188
id: auto-commit-action #mandatory for the output to show up in ${{ steps }}
189189
with:
190190
commit_message: Apply php-cs-fixer changes
@@ -220,7 +220,7 @@ You must use `action/checkout@v2` or later versions to check out the repository.
220220
In non-`push` events, such as `pull_request`, make sure to specify the `ref` to check out:
221221

222222
```yaml
223-
- uses: actions/checkout@v4
223+
- uses: actions/checkout@v5
224224
with:
225225
ref: ${{ github.head_ref }}
226226
```
@@ -238,7 +238,7 @@ You can change this by creating a new [Personal Access Token (PAT)](https://gith
238238
storing the token as a secret in your repository and then passing the new token to the [`actions/checkout`](https://github.com/actions/checkout#usage) Action step.
239239

240240
```yaml
241-
- uses: actions/checkout@v4
241+
- uses: actions/checkout@v5
242242
with:
243243
token: ${{ secrets.PAT }}
244244
```
@@ -284,7 +284,7 @@ The example below can be used as a starting point to generate a multiline commit
284284
# Quick and dirty step to get rid of the temporary file holding the commit message
285285
- run: rm -rf commitmessage.txt
286286
287-
- uses: stefanzweifel/git-auto-commit-action@v6
287+
- uses: stefanzweifel/git-auto-commit-action@v7
288288
id: commit
289289
with:
290290
commit_message: ${{ steps.commit_message_step.outputs.commit_message }}
@@ -308,7 +308,7 @@ As git-auto-commit by default does not use **your** username and email when crea
308308
git_commit_gpgsign: true
309309
310310
- name: "Commit and push changes"
311-
uses: stefanzweifel/git-auto-commit-action@v6
311+
uses: stefanzweifel/git-auto-commit-action@v7
312312
with:
313313
commit_author: "${{ steps.import-gpg.outputs.name }} <${{ steps.import-gpg.outputs.email }}>"
314314
commit_user_name: ${{ steps.import-gpg.outputs.name }}
@@ -371,7 +371,7 @@ jobs:
371371
contents: write
372372
373373
steps:
374-
- uses: actions/checkout@v4
374+
- uses: actions/checkout@v5
375375
with:
376376
# Checkout the fork/head-repository and push changes to the fork.
377377
# If you skip this, the base repository will be checked out and changes
@@ -385,7 +385,7 @@ jobs:
385385
- name: Run php-cs-fixer
386386
uses: docker://oskarstark/php-cs-fixer-ga
387387
388-
- uses: stefanzweifel/git-auto-commit-action@v6
388+
- uses: stefanzweifel/git-auto-commit-action@v7
389389
```
390390

391391
For more information about running Actions on forks, see [this announcement from GitHub](https://github.blog/2020-08-03-github-actions-improvements-for-fork-and-pull-request-workflows/).
@@ -420,7 +420,7 @@ The steps in your workflow might look like this:
420420
echo "message=$(git log -1 --pretty=%s)" >> $GITHUB_OUTPUT
421421
echo "author=$(git log -1 --pretty=\"%an <%ae>\")" >> $GITHUB_OUTPUT
422422
423-
- uses: stefanzweifel/git-auto-commit-action@v6
423+
- uses: stefanzweifel/git-auto-commit-action@v7
424424
with:
425425
commit_author: ${{ steps.last-commit.outputs.author }}
426426
commit_message: ${{ steps.last-commit.outputs.message }}
@@ -463,7 +463,7 @@ If you create a personal access token (classic), apply the `repo` and `workflow`
463463
If you create a fine-grained personal access token, apply the `Contents`-permissions.
464464
465465
```yaml
466-
- uses: actions/checkout@v4
466+
- uses: actions/checkout@v5
467467
with:
468468
# We pass the "PAT" secret to the checkout action; if no PAT secret is available to the workflow runner (eg. Dependabot) we fall back to the default "GITHUB_TOKEN".
469469
token: ${{ secrets.PAT || secrets.GITHUB_TOKEN }}
@@ -477,7 +477,7 @@ You can learn more about Personal Access Token in the [GitHub documentation](htt
477477
If you go the "force pushes" route, you have to enable force pushes to a protected branch (see [documentation](https://help.github.com/en/github/administering-a-repository/enabling-force-pushes-to-a-protected-branch)) and update your Workflow to use force push like this.
478478
479479
```yaml
480-
- uses: stefanzweifel/git-auto-commit-action@v6
480+
- uses: stefanzweifel/git-auto-commit-action@v7
481481
with:
482482
commit_message: Apply php-cs-fixer changes
483483
push_options: --force
@@ -507,7 +507,7 @@ This is due to the fact, that the `*.md`-glob is expanded before sending it to `
507507
To fix this add `disable_globbing: true` to your Workflow.
508508
509509
```yaml
510-
- uses: stefanzweifel/git-auto-commit-action@v6
510+
- uses: stefanzweifel/git-auto-commit-action@v7
511511
with:
512512
file_pattern: '*.md'
513513
disable_globbing: true
@@ -535,7 +535,7 @@ yarn test
535535
536536
We use [SemVer](http://semver.org/) for versioning. For the versions available, see the [tags on this repository](https://github.com/stefanzweifel/git-auto-commit-action/tags).
537537
538-
We also provide major version tags to make it easier to always use the latest release of a major version. For example, you can use `stefanzweifel/git-auto-commit-action@v6` to always use the latest release of the current major version.
538+
We also provide major version tags to make it easier to always use the latest release of a major version. For example, you can use `stefanzweifel/git-auto-commit-action@v7` to always use the latest release of the current major version.
539539
(More information about this [here](https://help.github.com/en/actions/building-actions/about-actions#versioning-your-action).)
540540
541541
## Credits

UPGRADING.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# Upgrading
22

3+
## From v6 to v7
4+
5+
The previously removed options `create_branch`, `skip_fetch`, and `skip_checkout` have been reintroduced in git-auto-commit v7. If you had removed these options from your workflows when upgrading to v6, you can now add them back if needed.
6+
7+
Tagging a commit has been reworked. In addition to the existing `tagging_message`-option, a new `tag_name` option has been added. If you were using `tagging_message`, you can continue to do so, but if you want to specify a custom tag name and tag message, you can now use the `tag_name` and `tagging_message` option.
8+
(Specifying a `tagging_message` without a `tag_name` will create a tag with the name and message both set to the value of `tagging_message`.)
9+
310
## From v5 to v6
411

512
The following options have been removed from git-auto-commit and can be removed from your workflows.

action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ inputs:
4444
description: Value used for the commit author. Defaults to the username of whoever triggered this workflow run.
4545
required: false
4646
default: ${{ github.actor }} <${{ github.actor_id }}+${{ github.actor }}@users.noreply.github.com>
47-
tag:
47+
tag_name:
4848
description: Tag name used for creating a new git tag with the commit. Keep this empty, if no tag should be created.
4949
required: false
5050
default: ''

entrypoint.sh

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -176,12 +176,12 @@ _local_commit() {
176176
}
177177
178178
_tag_commit() {
179-
echo "INPUT_TAG: ${INPUT_TAG}"
179+
echo "INPUT_TAG_NAME: ${INPUT_TAG_NAME}"
180180
echo "INPUT_TAGGING_MESSAGE: ${INPUT_TAGGING_MESSAGE}"
181181
182-
if [ -n "$INPUT_TAG" ] || [ -n "$INPUT_TAGGING_MESSAGE" ]; then
183-
INTERNAL_TAG=${INPUT_TAG:-$INPUT_TAGGING_MESSAGE}
184-
INTERNAL_TAGGING_MESSAGE=${INPUT_TAGGING_MESSAGE:-$INPUT_TAG}
182+
if [ -n "$INPUT_TAG_NAME" ] || [ -n "$INPUT_TAGGING_MESSAGE" ]; then
183+
INTERNAL_TAG=${INPUT_TAG_NAME:-$INPUT_TAGGING_MESSAGE}
184+
INTERNAL_TAGGING_MESSAGE=${INPUT_TAGGING_MESSAGE:-$INPUT_TAG_NAME}
185185
186186
_log "debug" "Create tag $INTERNAL_TAG: $INTERNAL_TAGGING_MESSAGE"
187187
git -c user.name="$INPUT_COMMIT_USER_NAME" -c user.email="$INPUT_COMMIT_USER_EMAIL" tag -a "$INTERNAL_TAG" -m "$INTERNAL_TAGGING_MESSAGE"
@@ -202,8 +202,8 @@ _push_to_github() {
202202
203203
if [ -z "$INPUT_BRANCH" ]
204204
then
205-
# Only add `--tags` option, if `$INPUT_TAG` or `$INPUT_TAGGING_MESSAGE` is set
206-
if [ -n "$INPUT_TAG" ] || [ -n "$INPUT_TAGGING_MESSAGE" ]
205+
# Only add `--tags` option, if `$INPUT_TAG_NAME` or `$INPUT_TAGGING_MESSAGE` is set
206+
if [ -n "$INPUT_TAG_NAME" ] || [ -n "$INPUT_TAGGING_MESSAGE" ]
207207
then
208208
_log "debug" "git push origin --tags";
209209
git push origin --follow-tags --atomic ${INPUT_PUSH_OPTIONS:+"${INPUT_PUSH_OPTIONS_ARRAY[@]}"};

0 commit comments

Comments
 (0)