Skip to content

Commit 61d5e47

Browse files
authored
Merge pull request #541 from Teko012/fix/update-action
Update default committer, fix mistakes
2 parents d98ee6a + 19c873f commit 61d5e47

File tree

2 files changed

+42
-42
lines changed

2 files changed

+42
-42
lines changed

README.md

Lines changed: 39 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
# YAML Update Action
22

3-
Update values in an existing YAML or JSON File. Push this updated File to an existing branch or create a new branch. Open a PullRequest to a configurable targetBranch. It is also posible to change the file locally without commiting the change.
3+
Update values in an existing YAML or JSON File. Push this updated File to an existing branch or create a new branch. Open a PullRequest to a configurable targetBranch. It is also possible to change the file locally without committing the change.
44

55

66
## Use Cases
77

8-
### Change a local YAML file without commiting the change
8+
### Change a local YAML file without committing the change
99

1010
With the latest release, the content of your actual file will be updated by default. So, you just need to skip the commit of your change.
1111

@@ -82,55 +82,55 @@ jobs:
8282
8383
### Base Configurations
8484
85-
|Argument | Description | Default |
86-
|------------|---------------------------------------------------------------------------------|---------------------|
87-
|valueFile | relative path from the Workspace Directory | _required_ Field if `changes` is not used |
88-
|propertyPath| PropertyPath for the new value, JSONPath supported | _required_ Field if `changes` is not used |
89-
|value | New value for the related PropertyPath | _required_ Field if `changes` is not used |
90-
|changes | Configure changes on multiple values and/or multiple files. Expects all changes as JSON, supported formats are `{"filepath":{"propertyPath":"value"}}` and `{"propertyPath":"value"}`. If you use the second format, it uses the filepath provided from the `valueFile` intput. ||
91-
|updateFile | **(deprected)** the updated content will be written into the actual file by default | `false` |
92-
|workDir | Relative location of the configured `repository` | . | |
93-
|format | Specify the used format parser of your file. WIll be guessed by file extension if not provided and uses YAML as fallback. Supports `YAML` and `JSON` ||
94-
|method | Configures the processing of none existing properties. Possible values: `CreateOrUpdate`, `Update`, `Create` | `CreateOrUpdate` |
95-
|noCompatMode| Removes quotes from reserved words, like Y, N, yes, no, on, etc. | `false` |
85+
| Argument | Description | Default |
86+
|--------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------|
87+
| valueFile | relative path from the Workspace Directory | _required_ Field if `changes` is not used |
88+
| propertyPath | PropertyPath for the new value, JSONPath supported | _required_ Field if `changes` is not used |
89+
| value | New value for the related PropertyPath | _required_ Field if `changes` is not used |
90+
| changes | Configure changes on multiple values and/or multiple files. Expects all changes as JSON, supported formats are `{"filepath":{"propertyPath":"value"}}` and `{"propertyPath":"value"}`. If you use the second format, it uses the filepath provided from the `valueFile` intput. | |
91+
| updateFile | **(deprecated)** the updated content will be written into the actual file by default | `false` |
92+
| workDir | Relative location of the configured `repository` | . | |
93+
| format | Specify the used format parser of your file. WIll be guessed by file extension if not provided and uses YAML as fallback. Supports `YAML` and `JSON` | |
94+
| method | Configures the processing of none existing properties. Possible values: `CreateOrUpdate`, `Update`, `Create` | `CreateOrUpdate` |
95+
| noCompatMode | Removes quotes from reserved words, like Y, N, yes, no, on, etc. | `false` |
9696

9797
#### Methods
9898

9999
Determine the behavior for none existing properties or array elements.
100100

101-
| Enum | Description |
102-
|----------------|-------------|
103-
| CreateOrUpdate | Updates existing values or creates them if not available |
104-
| Update | Updates existing values, skips the change if not |
101+
| Enum | Description |
102+
|----------------|-------------------------------------------------------------------------------|
103+
| CreateOrUpdate | Updates existing values or creates them if not available |
104+
| Update | Updates existing values, skips the change if not |
105105
| Create | Creates none existing values, skips the change if the property already exists |
106106

107107
### Git related Configurations
108108

109-
|Argument | Description | Default |
110-
|----------------|-------------------------------------------------------------------------------------------------------------|------------------------|
111-
|commitChange | Commit the change to __branch__ with the given __message__ | `true` |
112-
|message | Commit message for the changed YAML file | '' |
113-
|labels | Comma separated list of labels, e.g. "feature, yaml-updates" | 'yaml-updates' |
114-
|createPR | Create a PR from __branch__ to __targetBranch__. Use 'true' to enable it | `true` |
115-
|title | Custom title for the created Pull Request | 'Merge: {{message}}' |
116-
|description | Custom description for the created Pull Request | '' |
117-
|targetBranch | Opens a PR from __branch__ to __targetBranch__ if createPR is set to 'true' | `master` |
118-
|repository | The Repository where the YAML file is located and should be updated. You have to checkout this repository too and set the working-directory for this action to the same as the repository. See the example below | ${{github.repository}} |
119-
|branch | The updated YAML file will be commited to this branch, branch will be created if not exists | `master` |
120-
|masterBranchName| Branch name of your master branch | `master` |
121-
|githubAPI | BaseURL for all GitHub REST API requests | https://api.github.com |
122-
|token | GitHub API Token which is used to create the PR, have to have right permissions for the selected repository | ${{github.token}} |
123-
|commitUserName | Name used for the commit user | GitHub Actions |
124-
|commitUserEmail | Email address used for the commit user | actions@github.com |
109+
| Argument | Description | Default |
110+
|------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------|
111+
| commitChange | Commit the change to __branch__ with the given __message__ | `true` |
112+
| message | Commit message for the changed YAML file | '' |
113+
| labels | Comma separated list of labels, e.g. "feature, yaml-updates" | 'yaml-updates' |
114+
| createPR | Create a PR from __branch__ to __targetBranch__. Use 'true' to enable it | `true` |
115+
| title | Custom title for the created Pull Request | 'Merge: {{message}}' |
116+
| description | Custom description for the created Pull Request | '' |
117+
| targetBranch | Opens a PR from __branch__ to __targetBranch__ if createPR is set to 'true' | `master` |
118+
| repository | The Repository where the YAML file is located and should be updated. You have to checkout this repository too and set the working-directory for this action to the same as the repository. See the example below | ${{github.repository}} |
119+
| branch | The updated YAML file will be committed to this branch, branch will be created if not exists | `master` |
120+
| masterBranchName | Branch name of your master branch | `master` |
121+
| githubAPI | BaseURL for all GitHub REST API requests | https://api.github.com |
122+
| token | GitHub API Token which is used to create the PR, have to have right permissions for the selected repository | ${{github.token}} |
123+
| commitUserName | Name used for the commit user | github-actions[bot] |
124+
| commitUserEmail | Email address used for the commit user | 41898282+github-actions[bot]@users.noreply.github.com |
125125

126126
### Output
127127

128128
- `commit` Git Commit SHA
129-
- `pull_request` Git PR Informations
129+
- `pull_request` Git PR Information
130130

131-
## Debug Informations
131+
## Debug Information
132132

133-
Enable Debug mode to get informations about
133+
Enable Debug mode to get information about
134134

135135
- YAML parse and update results
136136
- Git Steps
@@ -139,7 +139,7 @@ Enable Debug mode to get informations about
139139

140140
In this first version the updated YAML file will not be patched. It is parsed into JSON, after the update its converted back to YAML. This means that comments and blank lines will be removed in this process and the intend of the updated content can be different to the previous.
141141

142-
By default each value will be interpreted as string. To use other kinds of value types you can use the specified YAML tags as shown here: [JS-YAML -Supported YAML types](https://github.com/nodeca/js-yaml#supported-yaml-types). Use this syntax as string, see the [test workflows](https://github.com/fjogeleit/yaml-update-action/blob/main/.github/workflows/test.yml) as example
142+
By default, each value will be interpreted as string. To use other kinds of value types you can use the specified YAML tags as shown here: [JS-YAML -Supported YAML types](https://github.com/nodeca/js-yaml#supported-yaml-types). Use this syntax as string, see the [test workflows](https://github.com/fjogeleit/yaml-update-action/blob/main/.github/workflows/test.yml) as example
143143

144144
## Examples
145145

@@ -151,7 +151,7 @@ jobs:
151151
runs-on: ubuntu-latest
152152
steps:
153153
- uses: actions/checkout@v3
154-
uses: fjogeleit/yaml-update-action@main
154+
- uses: fjogeleit/yaml-update-action@main
155155
with:
156156
valueFile: 'deployment/helm/values.yaml'
157157
branch: deployment/dev
@@ -175,7 +175,7 @@ jobs:
175175
runs-on: ubuntu-latest
176176
steps:
177177
- uses: actions/checkout@v3
178-
uses: fjogeleit/yaml-update-action@main
178+
- uses: fjogeleit/yaml-update-action@main
179179
with:
180180
valueFile: 'deployment/helm/values.yaml'
181181
branch: deployment/v1.0.1

action.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ inputs:
2323
description: 'Configures the processing of none existing properties. Possible values: CreateOrUpdate, Update, Create'
2424
changes:
2525
required: false
26-
description: 'Map of changes for a single or multiple files as JSON. Supports following formats: { "filepath": {"propertyPath": "value"}} or {"propertyPath": "value"}. If filepath is not provided it fallsback to the path configured under valueFile.'
26+
description: 'Map of changes for a single or multiple files as JSON. Supports following formats: { "filepath": {"propertyPath": "value"}} or {"propertyPath": "value"}. If filepath is not provided it falls back to the path configured under valueFile.'
2727
branch:
2828
required: false
2929
description: 'Branch to commit the change, will be created if not exist'
@@ -83,11 +83,11 @@ inputs:
8383
commitUserName:
8484
description: Name used for the commit user
8585
required: false
86-
default: GitHub Actions
86+
default: 'github-actions[bot]'
8787
commitUserEmail:
8888
description: Email address used for the commit user
8989
required: false
90-
default: actions@github.com
90+
default: '41898282+github-actions[bot]@users.noreply.github.com'
9191
reviewers:
9292
description: List of reviewers for the created Pull Request, if enabled
9393
required: false

0 commit comments

Comments
 (0)