Merge branch '6.2-dev' into 6.3-dev #952
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
# .github/workflows/readme-io.yml | |
name: Sync OpenAPI to ReadMe | |
on: [workflow_dispatch, push] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: get README_VERSION_ID | |
env: | |
IDJSON: ${{ secrets.README_ID_JSON }} | |
run: | | |
echo "GITHUB_REF_NAME: $GITHUB_REF_NAME" | |
README_VERSION_ID=$(python3 -c 'import json,os;print(json.loads(os.environ.get("IDJSON"))[os.environ.get("GITHUB_REF_NAME")])') | |
idsize=${#README_VERSION_ID} | |
if [ $idsize -lt 6 ]; then | |
echo "No ID found" | |
exit 1 | |
fi | |
echo "::add-mask::$README_VERSION_ID" | |
echo "README_VERSION_ID=${README_VERSION_ID}" >> $GITHUB_ENV | |
- name: lint with redocly in docker | |
uses: docker://redocly/openapi-cli | |
with: | |
args: lint openapi.yaml | |
- name: bundle with redocly in docker | |
run: | | |
docker run --rm -v $PWD:/spec redocly/openapi-cli bundle openapi.yaml > bundle.yaml | |
- name: push to readme | |
#uses: readmeio/[email protected] | |
uses: readmeio/[email protected] | |
with: | |
rdme: openapi bundle.yaml --key=${{ secrets.README_TOKEN }} --id=$README_VERSION_ID | |
continue-on-error: true |