Skip to content

Commit

Permalink
Merge pull request #165 from eclipse-tractusx/hotfix/swagger-hub
Browse files Browse the repository at this point in the history
chore: updated workflow to new packege path
  • Loading branch information
matbmoser authored Dec 22, 2023
2 parents 5f41693 + babc320 commit 7abb420
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/publish-swagger-hub.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -87,16 +87,16 @@ jobs:
- name: Create API
continue-on-error: true
run: |
swaggerhub api:create ${{ env.SWAGGERHUB_USER }}/digital-product-pass/${{ env.DOWNSTREAM_VERSION }} -f ./backend/productpass/tractusx-dpp-api.yaml --visibility=public --published=unpublish
swaggerhub api:create ${{ env.SWAGGERHUB_USER }}/digital-product-pass/${{ env.DOWNSTREAM_VERSION }} -f ./dpp-backend/digitalproductpass/tractusx-dpp-api.yaml --visibility=public --published=unpublish
# Post the API to SwaggerHub as "unpublished", because published APIs cannot be overwritten
- name: Publish API Specs to SwaggerHub
run: |
if [[ ${{ env.DOWNSTREAM_VERSION }} != *-SNAPSHOT ]]; then
echo "[INFO] - no snapshot, will set the API to 'published'";
swaggerhub api:update ${{ env.SWAGGERHUB_USER }}/digital-product-pass/${{ env.DOWNSTREAM_VERSION }} -f ./backend/productpass/tractusx-dpp-api.yaml --visibility=public --published=publish
swaggerhub api:update ${{ env.SWAGGERHUB_USER }}/digital-product-pass/${{ env.DOWNSTREAM_VERSION }} -f ./dpp-backend/digitalproductpass/tractusx-dpp-api.yaml --visibility=public --published=publish
swaggerhub api:setdefault ${{ env.SWAGGERHUB_USER }}/digital-product-pass/${{ env.DOWNSTREAM_VERSION }}
else
echo "[INFO] - snapshot, will set the API to 'unpublished'";
swaggerhub api:update ${{ env.SWAGGERHUB_USER }}/digital-product-pass/${{ env.DOWNSTREAM_VERSION }} -f ./backend/productpass/tractusx-dpp-api.yaml --visibility=public --published=unpublish
swaggerhub api:update ${{ env.SWAGGERHUB_USER }}/digital-product-pass/${{ env.DOWNSTREAM_VERSION }} -f ./dpp-backend/digitalproductpass/tractusx-dpp-api.yaml --visibility=public --published=unpublish
fi

0 comments on commit 7abb420

Please sign in to comment.