test: config version update #31
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: Sync docs in ReadMe ๐ฆ | ||
on: | ||
push: | ||
branches: | ||
# This workflow will run every time changes in the OpenAPI docs are | ||
# pushed to the `main` branch. | ||
- main | ||
paths: | ||
- 'openapiv2/core/**' | ||
- 'openapiv2/model/**' | ||
- 'openapiv2/vdp/**' | ||
jobs: | ||
sync-openapi-private: | ||
name: Keep private (staging) docs in sync with `main` | ||
runs-on: ubuntu-latest | ||
outputs: | ||
new_release: ${{ steps.check-new-release.outputs.new_release }} | ||
steps: | ||
- name: Check out repo ๐ | ||
uses: actions/checkout@v3 | ||
with: | ||
# Needed in checkNewRelease to compare with the previous commit. | ||
fetch-depth: 0 | ||
# - name: Sync Core ๐ฎ | ||
# uses: readmeio/rdme@v8 | ||
# with: | ||
# rdme: openapi openapiv2/core/service.swagger.yaml --key=${{ secrets.README_API_KEY }} --id=65ca17433dcd850078ffca3f | ||
# - name: Sync Model โ๏ธ | ||
# uses: readmeio/rdme@v8 | ||
# with: | ||
# rdme: openapi openapiv2/model/service.swagger.yaml --key=${{ secrets.README_API_KEY }} --id=65ca17433dcd850078ffca41 | ||
# - name: Sync VDP ๐ง | ||
# uses: readmeio/rdme@v8 | ||
# with: | ||
# rdme: openapi openapiv2/vdp/service.swagger.yaml --key=${{ secrets.README_API_KEY }} --id=65ca17433dcd850078ffca40 | ||
- name: Check new release ๐ | ||
id: check-new-release | ||
run: | | ||
# If the version in the OpenAPI configuration has changed, set the | ||
# new release version (without the "v" prefix) to a variable. | ||
if [[ `git diff ${{ github.event.before }} ${{ github.event.after }} common/openapi/v1beta/api_info.conf | grep "^+\s\+version"` ]]; then | ||
echo "new_release=$(grep version common/openapi/v1beta/api_info.conf | sed 's/.*\"v\(.*\)\".*/\1/')" >> $GITHUB_OUTPUT | ||
fi | ||
sync-openapi-public: | ||
name: Sync public docs on new release | ||
needs: [sync-openapi-private] | ||
env: | ||
Release: ${{ needs.sync-openapi-private.outputs.new_release }} | ||
runs-on: ubuntu-latest | ||
if: ${{ env.Release != '' }} | ||
Check failure on line 57 in .github/workflows/sync-api-docs.yml GitHub Actions / Sync docs in ReadMe ๐ฆInvalid workflow file
|
||
steps: | ||
- name: Check out repo ๐ | ||
uses: actions/checkout@v3 | ||
- name: Create new version ๐ | ||
uses: readmeio/rdme@v8 | ||
with: | ||
rdme: versions:create ${{ env.Release }} --fork 0-beta-staging --codename=${{ env.Release}} --main true --beta true --isPublic true --key=${{ secrets.README_API_KEY }} |