Skip to content

Update send-to-discovery.yml #128

Update send-to-discovery.yml

Update send-to-discovery.yml #128

name: Send Discovered API to ApiConnect
on: [pull_request, workflow_dispatch, push]
env:
API_HOST: e2etest-sanity-ocp.cp.fyre.ibm.com
# platform_api_prefix is not required to change for ApiConnect on Cloud
PLATFORM_API_PREFIX: production-mgmt-platform-api-apic.apps
PROVIDER_ORG: api-test
API_FILES: APIfolder/api-with-examples.yaml
#API_FOLDERS: APIfolder,APIfolderTwo
jobs:
run-discovery:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Difference
id: difference-output
run: |
echo "action_updates=$(git diff --name-only --diff-filter=ACMRT ${{ github.event.before }} ${{ github.sha }} | xargs)" >> $GITHUB_OUTPUT
- uses: ibm-apiconnect/apic-discovery-action@main
id: discover-apis
with:
api_host: ${{ env.API_HOST }}
platform_api_prefix: ${{ env.PLATFORM_API_PREFIX }}
provider_org: ${{ env.PROVIDER_ORG }}
api_key: ${{ secrets.apicApikey }}
api_files: ${{ env.API_FILES }}
api_folders: ${{ env.API_FOLDERS }}
resync_check: ${{ true }}
git_diff: ${{ steps.difference-output.outputs.action_updates }}
- name: Display the action-result
run: |
echo "Result of the action: ${{ steps.discover-apis.outputs.action-result }}"
echo "End"