Skip to content

Commit

Permalink
feat: use proto conf as new version indicator
Browse files Browse the repository at this point in the history
  • Loading branch information
jvallesm committed Feb 13, 2024
1 parent 1654e58 commit d621039
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/sync-api-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
name: Keep private (staging) docs in sync with `main`
runs-on: ubuntu-latest
outputs:
should_update_public: ${{ steps.check-new-release.outputs.is_new_release }}
new_release: ${{ steps.check-new-release.outputs.new_release }}
steps:
- name: Check out repo πŸ“š
uses: actions/checkout@v3
Expand All @@ -42,24 +42,24 @@ jobs:
- name: Check new release πŸ”
id: check-new-release
run: |
if [[ `git diff ${{ github.event.before }} ${{ github.event.after }} openapiv2/vdp openapiv2/core openapiv2/model | grep "^+\s\+version"` ]]; then
echo 'is_new_release=true' >> $GITHUB_OUTPUT
else
echo 'is_new_release=false' >> $GITHUB_OUTPUT
# 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]
runs-on: ubuntu-latest
if: needs.sync-openapi-private.outputs.should_update_public == 'true'
if: needs.sync-openapi-private.outputs.new_release != ""
steps:
- name: Check out repo πŸ“š
uses: actions/checkout@v3

- name: Receive version
run: |
echo ${{ needs.sync-openapi-private.outputs.should_update_public }}
echo ${{ needs.sync-openapi-private.outputs.new_release }}
# - name: Create new version πŸš€
# uses: readmeio/rdme@v8
Expand Down

0 comments on commit d621039

Please sign in to comment.