Skip to content

Commit

Permalink
Update yaml2json.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
cebe authored Dec 6, 2019
1 parent ca88940 commit 1572979
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions .github/workflows/yaml2json.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
name: YAML2JSON

#
# This workflow updates the *.json files in the examples/v3.0 directory,
# when the corresponding *.yaml files change.
# JSON example files are automatically generated from the YAML example files.
# Only the YAML files should be adjusted manually.
#

# run this on push to master
on:
push:
Expand Down Expand Up @@ -30,16 +37,10 @@ jobs:
echo "converting $file to $target ..."
if [ "$file" != "api-with-examples.yaml" ] ; then
vendor/bin/php-openapi convert --read-yaml $file --write-json $target
head $target
vendor/bin/indent --tabs --tabstop=4 $target
head $target
vendor/bin/indent --spaces --tabstop=2 $target
head $target
fi
done
git status
git diff
git diff --staged
- name: cleanup
run: |
Expand All @@ -61,7 +62,9 @@ jobs:
title: Update JSON example files
commit-message: Update JSON example files
body: |
This pull request is automatically triggered by github actions.
This pull request is automatically triggered by github actions [create-pull-request][1].
It seems the OpenAPI example YAML files have changed, so the JSON files are automatically being adjusted.
[1]: https://github.com/peter-evans/create-pull-request

0 comments on commit 1572979

Please sign in to comment.