generate_api_index.yaml 1020 B

123456789101112131415161718192021222324252627282930313233
  1. name: Generate API Index
  2. on: # yamllint disable-line rule:truthy
  3. push:
  4. branches: [master]
  5. workflow_dispatch:
  6. jobs:
  7. build:
  8. runs-on: ubuntu-latest
  9. steps:
  10. - name: Setup .NET Core SDK
  11. uses: actions/setup-dotnet@v1.8.0
  12. - name: Checkout googleapis (this repository)
  13. uses: actions/checkout@v2
  14. with:
  15. path: googleapis
  16. - name: Checkout index generator
  17. uses: actions/checkout@v2
  18. with:
  19. repository: googleapis/googleapis-api-index-generator
  20. path: gen
  21. - name: Generate API index
  22. run: |
  23. gen/scripts/generate-schema.sh
  24. gen/scripts/generate-index.sh $PWD/googleapis
  25. cp gen/tmp/api-index-v1.json $PWD/googleapis
  26. - name: Commit API index
  27. run: |
  28. cd googleapis
  29. [[ ! $(git diff --exit-code api-index-v1.json) ]] && echo "Nothing to commit." && exit 0
  30. git config user.name "Google APIs"
  31. git add api-index-v1.json
  32. git commit -m "chore: regenerate API index"
  33. git push