@@ -306,7 +306,6 @@ You can bypass the binary hash check using the `ignore-sha-check` parameter (not
306306 ignore-sha-check: true
307307` ` `
308308
309-
310309# Google Play Devices
311310
312311For Android tests, you can run your flows against Google Play devices :
@@ -331,6 +330,51 @@ For iOS tests, you can run your flows against x86 architecture simulators instea
331330 x86-arch: true
332331` ` `
333332
333+ # Using Action Outputs
334+
335+ The action provides several outputs that you can use in subsequent steps of your workflow. Here's how to use them :
336+
337+ ` ` ` yaml
338+ jobs:
339+ test:
340+ runs-on: ubuntu-latest
341+ steps:
342+ - uses: devicecloud-dev/device-cloud-for-maestro@v1
343+ id: devicecloud # Important: Add an ID to reference the step
344+ with:
345+ api-key: ${{ secrets.DCD_API_KEY }}
346+ app-file: app.apk
347+
348+ # Example: Post test results to a Slack channel
349+ - name: Post Test Results
350+ if: always() # Run even if tests fail
351+ 352+ with:
353+ channel-id: 'test-results'
354+ slack-message: |
355+ Test Run Status: ${{ steps.devicecloud.outputs.DEVICE_CLOUD_UPLOAD_STATUS }}
356+ View Results: ${{ steps.devicecloud.outputs.DEVICE_CLOUD_CONSOLE_URL }}
357+ env:
358+ SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
359+
360+ # Example: Save test results as artifacts
361+ - name: Save Test Results
362+ if: always()
363+ run: |
364+ echo '${{ steps.devicecloud.outputs.DEVICE_CLOUD_FLOW_RESULTS }}' > test-results.json
365+
366+ # Example: Use app binary ID in subsequent steps
367+ - name: Use App Binary ID
368+ if: success()
369+ run: |
370+ echo "App Binary ID: ${{ steps.devicecloud.outputs.DEVICE_CLOUD_APP_BINARY_ID }}"
371+ ` ` `
372+
373+ Available outputs :
374+ - `DEVICE_CLOUD_CONSOLE_URL` : URL to view the test results in the Device Cloud console
375+ - `DEVICE_CLOUD_FLOW_RESULTS` : JSON array containing results for each flow, including name and status
376+ - `DEVICE_CLOUD_UPLOAD_STATUS` : Status of the test run (PENDING, RUNNING, PASSED, FAILED, CANCELLED)
377+ - `DEVICE_CLOUD_APP_BINARY_ID` : ID of the uploaded app binary in Device Cloud
334378
335379# All Available Options
336380
0 commit comments