name: "Ocamba Velocity Integration API Caller" description: "Calls the Ocamba Velocity Integration API with the required parameters." inputs: repo_name: description: "Repository name (mandatory)" required: true sha: description: "Optional commit SHA" required: false env: description: "Optional environment. Set to 'dev' for development; defaults to production." required: false default: "prod" token: description: "Bearer token for Authorization header (mandatory)" required: true runs: using: "composite" steps: - name: Determine API Domain shell: bash run: | if [ "${{ inputs.env }}" = "dev" ]; then VELOCITY_API_DOMAIN="dev-api.ocamba.com" else VELOCITY_API_DOMAIN="api.ocamba.com" fi # Export API_DOMAIN so it's available in subsequent steps echo "VELOCITY_API_DOMAIN=$VELOCITY_API_DOMAIN" >> $GITHUB_ENV - name: Call Ocamba Velocity Integration API shell: bash run: | URL="https://${VELOCITY_API_DOMAIN}/v1/velocity/integration?repo_name=${{ inputs.repo_name }}" # Append sha parameter if provided if [ -n "${{ inputs.sha }}" ]; then URL="${URL}&sha=${{ inputs.sha }}" fi curl -X GET "${URL}" -H "Authorization: Bearer ${{ inputs.token }}"