File tree 5 files changed +38
-5
lines changed
5 files changed +38
-5
lines changed Original file line number Diff line number Diff line change
1
+ name : Update openapi.json using openapi.yaml and commit result
2
+
3
+ on :
4
+ pull_request :
5
+ branches : [ "main" ]
6
+
7
+ jobs :
8
+ run_conversion :
9
+ name : Run convert_to_json.py script
10
+ runs-on : ubuntu-latest
11
+ steps :
12
+ - uses : actions/checkout@v4
13
+ - name : Install dependencies
14
+ run : |
15
+ cd python
16
+ python -m pip install --upgrade pip
17
+ python -m pip install poetry
18
+ poetry install
19
+ poetry run convert_to_json ../openapi.yaml ../openapi.json
20
+
21
+ - name : Commit result
22
+ uses : stefanzweifel/git-auto-commit-action@v5
23
+ id : auto-commit-action
24
+ with :
25
+ commit_message : Update openapi.json to match openapi.yaml
26
+ file_pattern : openapi.json
27
+
28
+ - if : steps.auto-commit-action.outputs.changes_detected == 'true'
29
+ run : echo "Update openapi.json"
30
+
31
+ - if : steps.auto-commit-action.outputs.changes_detected == 'false'
32
+ run : echo "openapi.json is already up to date"
Original file line number Diff line number Diff line change 1
1
.idea /
2
+ * .pyc
File renamed without changes.
Original file line number Diff line number Diff line change 1
1
[tool .poetry ]
2
- name = " deepl_openapi"
2
+ name = " scripts"
3
+ package-mode = false
3
4
description = " DeepL OpenAPI specification and associated scripts"
4
- version = " 0.1.0"
5
- authors = [
" DeepL SE <[email protected] >" ]
6
5
license = " MIT"
7
- readme = " README.md"
8
6
7
+ [tool .poetry .scripts ]
8
+ convert_to_json = " scripts.convert_to_json:main"
9
9
10
10
[tool .poetry .dependencies ]
11
11
python = " >=3.7"
Original file line number Diff line number Diff line change 5
5
6
6
@click .command (
7
7
"convert_to_json" ,
8
- help = "Convert OpenAPI YAML to JSON (using std-in and std-out) " ,
8
+ help = "Convert OpenAPI YAML to JSON " ,
9
9
)
10
10
@click .argument ("input" )
11
11
@click .argument ("output" )
You can’t perform that action at this time.
0 commit comments