generated from devops-infra/template-action
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #42 from devops-infra/bugfix/prefix
Set commit_prefix to empty by default
- Loading branch information
Showing
4 changed files
with
17 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -47,17 +47,17 @@ Features: | |
``` | ||
| Input Variable | Required | Default | Description | | ||
| ------------------- | -------- | ---------------- | ------------------------------------------------------------------------------------------------------------------------------- | | ||
| github_token | Yes | `""` | Personal Access Token for GitHub for pushing the code. | | ||
| add_timestamp | No | `false` | Whether to add the timestamp to a new branch name. Used when `target_branch` is set. Uses format `%Y-%m-%dT%H-%M-%SZ`. | | ||
| amend | No | `false` | Whether to make amendment to the previous commit (`--amend`). Cannot be used together with `commit_message` or `commit_prefix`. | | ||
| commit_prefix | No | `[AUTO-COMMIT]` | Prefix added to commit message. If `commit_message` is not used. | | ||
| commit_message | No | `""` | Full commit message to set. Cannot be used together with `amend`. | | ||
| force | No | `false` | Whether to use force push for fast-forward changes (`--force`). Use only if necessary, e.g. when using `--amend`. | | ||
| no_edit | No | `false` | Whether to not edit commit message when using amend (`--no-edit`). | | ||
| organization_domain | No | `github.com` | Github Enterprise domain name. | | ||
| target_branch | No | *current branch* | Name of a new branch to push the code into. Creates branch if not existing. | | ||
| Input Variable | Required | Default | Description | | ||
| ------------------- | -------- | ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | ||
| github_token | Yes | `""` | Personal Access Token for GitHub for pushing the code. | | ||
| add_timestamp | No | `false` | Whether to add the timestamp to a new branch name. Used when `target_branch` is set. Uses format `%Y-%m-%dT%H-%M-%SZ`. | | ||
| amend | No | `false` | Whether to make amendment to the previous commit (`--amend`). Cannot be used together with `commit_message` or `commit_prefix`. | | ||
| commit_prefix | No | `""` | Prefix added to commit message. If `commit_message` is not used. | | ||
| commit_message | No | `""` | Full commit message to set. Cannot be used together with `amend`. | | ||
| force | No | `false` | Whether to use force push for fast-forward changes (`--force`). Use only if necessary, e.g. when using `--amend`. And set `fetch-depth: 0` for `actions/checkout`. | | ||
| no_edit | No | `false` | Whether to not edit commit message when using amend (`--no-edit`). | | ||
| organization_domain | No | `github.com` | Github Enterprise domain name. | | ||
| target_branch | No | *current branch* | Name of a new branch to push the code into. Creates branch if not existing. | | ||
|
||
| Outputs | Description | | ||
| ------------- | ------------------------------------------------------------------------ | | ||
|
@@ -82,7 +82,7 @@ jobs: | |
run: | | ||
find . -type f -name "*" -print0 | xargs -0 sed -i "s/foo/bar/g" | ||
- name: Commit and push changes | ||
uses: devops-infra/[email protected].2 | ||
uses: devops-infra/[email protected].3 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
commit_message: Replaced foo with bar | ||
|
@@ -103,7 +103,7 @@ jobs: | |
run: | | ||
find . -type f -name "*" -print0 | xargs -0 sed -i "s/foo/bar/g" | ||
- name: Commit and push changes | ||
uses: devops-infra/[email protected].2 | ||
uses: devops-infra/[email protected].3 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
commit_prefix: "[AUTO-COMMIT] foo/bar replace" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters