Skip to content

Commit 1572979

Browse files
authored
Update yaml2json.yml
1 parent ca88940 commit 1572979

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

.github/workflows/yaml2json.yml

+10-7
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
name: YAML2JSON
22

3+
#
4+
# This workflow updates the *.json files in the examples/v3.0 directory,
5+
# when the corresponding *.yaml files change.
6+
# JSON example files are automatically generated from the YAML example files.
7+
# Only the YAML files should be adjusted manually.
8+
#
9+
310
# run this on push to master
411
on:
512
push:
@@ -30,16 +37,10 @@ jobs:
3037
echo "converting $file to $target ..."
3138
if [ "$file" != "api-with-examples.yaml" ] ; then
3239
vendor/bin/php-openapi convert --read-yaml $file --write-json $target
33-
head $target
3440
vendor/bin/indent --tabs --tabstop=4 $target
35-
head $target
3641
vendor/bin/indent --spaces --tabstop=2 $target
37-
head $target
3842
fi
3943
done
40-
git status
41-
git diff
42-
git diff --staged
4344
4445
- name: cleanup
4546
run: |
@@ -61,7 +62,9 @@ jobs:
6162
title: Update JSON example files
6263
commit-message: Update JSON example files
6364
body: |
64-
This pull request is automatically triggered by github actions.
65+
This pull request is automatically triggered by github actions [create-pull-request][1].
6566
6667
It seems the OpenAPI example YAML files have changed, so the JSON files are automatically being adjusted.
68+
69+
[1]: https://github.com/peter-evans/create-pull-request
6770

0 commit comments

Comments
 (0)