Skip to content

Conversation

@andyshinn
Copy link

@andyshinn andyshinn commented Dec 7, 2025

Changes

  • Outputs a buildId that can be used for other things.

Checklist

  • Read the contribution guide and accept the code of conduct
  • Readme (updated or not needed)
  • Tests (added, updated or not needed)

Summary by CodeRabbit

  • New Features

    • Steam BuildID is now automatically extracted and exported from the build upload process, making it available for downstream steps and workflows.
  • Chores

    • Updated build logging to capture and retain upload diagnostics for improved troubleshooting.

✏️ Tip: You can customize this high-level summary in your review settings.

Copilot AI review requested due to automatic review settings December 7, 2025 19:03
@coderabbitai
Copy link

coderabbitai bot commented Dec 7, 2025

Walkthrough

The pull request adds BuildID capture functionality to a Steam deployment GitHub Action. It introduces output logging for the build upload command, extracts the BuildID from logs, and exports it as an action output alongside the manifest path.

Changes

Cohort / File(s) Summary
Configuration & Metadata
action.yml, .gitignore
Declares new buildId input and output in action metadata; ignores the new build_output.log file generated during deployment
Script Implementation
steam_deploy.sh
Pipes build upload command output to build_output.log via tee; extracts BuildID from logs using grep and appends to GITHUB_OUTPUT for downstream step access

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • Areas to verify:
    • Confirm the grep pattern reliably extracts BuildID from Steam's output format
    • Validate that tee redirection doesn't affect error handling or exit codes
    • Ensure build_output.log path is correctly relative to the working directory

Poem

🐰 A log file springs up in the night,
BuildID extracted, shining bright!
Tee and grep join the quest,
To capture what's best—
The build's golden ID, pure delight! ✨

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title 'output buildId' directly relates to the main purpose of the PR: exposing buildId as an output for downstream use.
Description check ✅ Passed The description follows the required template with Changes and Checklist sections, though the Changes section is minimal and some checklist items remain unchecked without justification.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 8bd9bac and ec1daa3.

📒 Files selected for processing (3)
  • .gitignore (1 hunks)
  • action.yml (1 hunks)
  • steam_deploy.sh (2 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Agent
🔇 Additional comments (5)
.gitignore (1)

2-2: LGTM!

Adding build_output.log to .gitignore is appropriate since the file is generated at runtime and should not be tracked in version control.

steam_deploy.sh (3)

167-167: Output redirection via tee looks good.

The use of tee build_output.log preserves both the live output stream and the log file while maintaining the error handling chain. This is the right approach.


215-215: Verify grep PCRE pattern against actual steamcmd output format.

The buildId extraction relies on a specific steamcmd output format: (BuildID <digits>). If the output format differs or changes, the grep will silently fail and export an empty buildId.

Confirm that:

  1. Your Docker image has grep with PCRE support (grep -P available)
  2. The steamcmd output actually matches the pattern \(BuildID \K\d+(?=\))
  3. Downstream workflows can safely handle an empty or missing buildId value

You may want to add logging to warn if buildId extraction fails:

 buildId=$(grep -oP '\(BuildID \K\d+(?=\))' build_output.log || echo "")
+if [ -z "$buildId" ]; then
+  echo "::warning::Failed to extract BuildID from build output"
+fi

217-218: LGTM!

The export pattern matches the existing manifest export and correctly writes to GITHUB_OUTPUT for downstream step consumption.

action.yml (1)

95-96: LGTM!

The buildId output is properly defined with clear description. It's correctly positioned in the outputs section (not inputs) since it's computed by the script.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a new buildId output to the Steam Deploy GitHub Action, which captures the Steam BuildID from the upload process. This enables workflows to reference the specific build ID for downstream operations like notifications, tracking, or additional automation steps.

Key Changes

  • Captures steamcmd output to a log file using tee for post-processing
  • Extracts the BuildID using grep with a Perl-compatible regex pattern
  • Exposes buildId as a GitHub Action output alongside the existing manifest output

Reviewed changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated 2 comments.

File Description
steam_deploy.sh Pipes steamcmd output through tee to capture logs, extracts BuildID using grep pattern, and outputs buildId to GITHUB_OUTPUT
action.yml Adds buildId output definition with description
.gitignore Excludes build_output.log from version control

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +215 to +218
buildId=$(grep -oP '\(BuildID \K\d+(?=\))' build_output.log || echo "")

echo "manifest=${manifest_path}" >> $GITHUB_OUTPUT
echo "buildId=${buildId}" >> $GITHUB_OUTPUT
Copy link

Copilot AI Dec 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new buildId output lacks test coverage. The existing workflow in .github/workflows/main.yml should be updated to verify that the buildId output is correctly captured and set.

Consider adding a step after the steam-deploy action to check the output:

- id: deploy
  uses: ./
  with:
    # existing configuration
- run: |
    echo "Build ID: ${{ steps.deploy.outputs.buildId }}"
    if [ -z "${{ steps.deploy.outputs.buildId }}" ]; then
      echo "Warning: buildId output is empty"
    fi

Copilot uses AI. Check for mistakes.
Comment on lines +95 to +96
buildId:
description: "The Steam BuildID of the uploaded build"
Copy link

Copilot AI Dec 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new buildId output is not documented in the README. Users should be informed about this new output and how to use it.

Consider adding a section in the README that documents the outputs available from this action, including both manifest and buildId. For example:

## Outputs

#### buildId

The Steam BuildID of the uploaded build. This can be used to reference the specific build in subsequent steps or for tracking purposes.

#### manifest

The path to the generated manifest.vdf file.

Copilot uses AI. Check for mistakes.
@andyshinn
Copy link
Author

@copilot open a new pull request to apply changes based on the comments in this thread

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.

1 participant