Skip to content

docs: add conditional execution example using runner.debug#40

Merged
Garbee merged 3 commits intomainfrom
copilot/add-readme-example-metric-collection
Feb 16, 2026
Merged

docs: add conditional execution example using runner.debug#40
Garbee merged 3 commits intomainfrom
copilot/add-readme-example-metric-collection

Conversation

Copy link
Contributor

Copilot AI commented Feb 16, 2026

Adds documentation for conditionally enabling metric collection using the runner.debug context. Teams can leave the action instrumented in workflows but only activate collection on-demand via GitHub's "Enable debug logging" checkbox during re-runs.

Changes

  • New section: "Conditional Collection with Debug Mode" positioned after Basic Usage
  • Complete example: Shows if: ${{ runner.debug == '1' }} pattern for conditional step execution
  • Enablement instructions: Documents the re-run jobs checkbox workflow
  • Benefits: No workflow file edits needed to enable/disable collection

Example

steps:
  # Only collect metrics when debug mode is enabled
  - name: Start Workflow Telemetry
    if: ${{ runner.debug == '1' }}
    uses: garbee/runner-resource-usage@v1

  - name: Checkout
    uses: actions/checkout@v6

When investigating resource issues, any team member can enable collection by re-running the workflow with debug logging enabled—no code changes required.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 2 commits February 16, 2026 12:19
Co-authored-by: Garbee <868301+Garbee@users.noreply.github.com>
Co-authored-by: Garbee <868301+Garbee@users.noreply.github.com>
Copilot AI changed the title [WIP] Add README example for conditional metric collection using runner debug docs: add conditional execution example using runner.debug Feb 16, 2026
Copilot AI requested a review from Garbee February 16, 2026 12:21
@Garbee Garbee marked this pull request as ready for review February 16, 2026 12:37
@Garbee Garbee merged commit 0008688 into main Feb 16, 2026
15 checks passed
@Garbee Garbee deleted the copilot/add-readme-example-metric-collection branch February 16, 2026 12:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants