Skip to content

Commit 80ceac8

Browse files
authored
Merge pull request #120 from bengeois/ft/custom-commit-message
Add customizable commit messages for deploy and destroy actions
2 parents 6496908 + e97f006 commit 80ceac8

2 files changed

Lines changed: 12 additions & 2 deletions

File tree

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,8 @@ Input parameter | Description
110110

111111
| Input parameter | Description |
112112
| --- | --- |
113+
| `deploy-commit-message` | The commit message to use when adding/updating a preview. <br> You can use GitHub context variables like `${{ github.event.number }}`. <br><br> Default: `Deploy preview for PR ${{ github.event.number }} 🛫` |
114+
| `remove-commit-message` | The commit message to use when removing a preview. <br> Note: If using `action` with a value of `"auto"`, you need to specify BOTH `deploy-commit-message` and `remove-commit-message`. <br><br> Default: `Remove preview for PR ${{ github.event.number }} 🛬` |
113115
| `git-config-name` | The git user.name to use for the deployment commit. <br><br> Default: The user who created the `token` |
114116
| `git-config-email` | The git user.email to use for the deployment commit. <br><br> Default: The user who created the `token` |
115117

action.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,14 @@ inputs:
5353
description: Whether to leave a sticky comment on the calling PR.
5454
required: false
5555
default: "true"
56+
deploy-commit-message:
57+
description: The commit message to use when adding/updating a preview.
58+
required: false
59+
default: Deploy preview for PR ${{ github.event.number }} 🛫
60+
remove-commit-message:
61+
description: The commit message to use when removing a preview.
62+
required: false
63+
default: Remove preview for PR ${{ github.event.number }} 🛬
5664
git-config-name:
5765
description: The git user.name to use for the deployment commit.
5866
required: false
@@ -139,7 +147,7 @@ runs:
139147
branch: ${{ inputs.preview-branch }}
140148
folder: ${{ inputs.source-dir }}
141149
target-folder: ${{ env.preview_file_path }}
142-
commit-message: Deploy preview for PR ${{ github.event.number }} 🛫
150+
commit-message: ${{ inputs.deploy-commit-message }}
143151
force: false
144152
git-config-name: ${{ inputs.git-config-name }}
145153
git-config-email: ${{ inputs.git-config-email }}
@@ -167,7 +175,7 @@ runs:
167175
branch: ${{ inputs.preview-branch }}
168176
folder: ${{ env.empty_dir_path }}
169177
target-folder: ${{ env.preview_file_path }}
170-
commit-message: Remove preview for PR ${{ github.event.number }} 🛬
178+
commit-message: ${{ inputs.remove-commit-message }}
171179
force: false
172180
git-config-name: ${{ inputs.git-config-name }}
173181
git-config-email: ${{ inputs.git-config-email }}

0 commit comments

Comments
 (0)