Add webhook bash script (#235) #505
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Update OpenAPI spec | |
on: [push] | |
jobs: | |
openapi: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
ref: ${{ github.head_ref }} | |
- name: Start anubis | |
working-directory: . | |
run: | | |
docker build -t orchestracities/anubis:latest . | |
docker run -p 127.0.0.1:8085:8000/tcp --name anubis -d orchestracities/anubis:latest | |
- name: Start middleware | |
working-directory: ./policy-governance-middleware | |
run: | | |
docker build -t orchestracities/anubis-middleware:latest . | |
docker run -p 127.0.0.1:8098:8098/tcp --name middleware -d orchestracities/anubis-middleware | |
- name: Update Open API spec | |
working-directory: ./scripts | |
run: | | |
./download_open_api.sh | |
- name: Generate walktrhough | |
working-directory: . | |
run: | | |
npm install -g openapi-markdown | |
openapi-markdown -i open-api-spec/api-manager/openapi.json -o docs/user/walkthrough.md | |
sed -i '1 i\ | |
<!-- markdownlint-disable -->' docs/user/walkthrough.md | |
- name: Generate walktrhough middleware | |
working-directory: . | |
run: | | |
npm install -g openapi-markdown | |
openapi-markdown -i open-api-spec/middleware/openapi.json -o docs/user/walkthrough-middleware.md | |
sed -i '1 i\ | |
<!-- markdownlint-disable -->' docs/user/walkthrough-middleware.md | |
sed -i '/null/d' docs/user/walkthrough-middleware.md | |
sed -i '/### Terms of service/d' docs/user/walkthrough-middleware.md | |
- name: Commit changes | |
uses: stefanzweifel/git-auto-commit-action@v4 | |
with: | |
commit_message: Update open api specs | |
- name: Clean up | |
run: | | |
docker rm -f anubis |