Fix running steam-deploy more than once in the same job - #91
Merged
Conversation
The action created BuildOutput/, manifest.vdf, and depot*.vdf in the workspace root, so a second `uses:` of the action in the same job failed with `mkdir: cannot create directory 'BuildOutput': File exists`. Because the action runs in a container as root, those leftovers were also root-owned and could break a later checkout on self-hosted runners. Everything temporary now goes into a per-run mktemp dir under $RUNNER_TEMP, and an EXIT trap chowns it back to the workspace owner. Adds a regression test to the workflow that runs the action twice and asserts the workspace is left clean and writable. Fixes #79 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThe deployment script now stores manifests, build output, and logs in a unique temporary directory. The workflow runs deployment twice and verifies that the workspace remains writable and contains no ChangesSteam deployment isolation
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant GitHub Actions
participant steam_deploy.sh
participant SteamCMD
GitHub Actions->>steam_deploy.sh: invoke deployment
steam_deploy.sh->>steam_deploy.sh: create unique temporary workspace
steam_deploy.sh->>SteamCMD: build with temporary app manifest
SteamCMD-->>steam_deploy.sh: write build log and output
steam_deploy.sh-->>GitHub Actions: return deployment result
GitHub Actions->>steam_deploy.sh: invoke deployment again
steam_deploy.sh->>SteamCMD: build using a new temporary workspace
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
frostebite
approved these changes
Aug 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
steam_deploy.shcreated its temporary files —BuildOutput/,manifest.vdf, anddepot*.vdf— directly in the workspace root. A seconduses:of this action in the same job therefore died at:Since the action runs in a container as root, those leftovers were also root-owned, which can break a subsequent
actions/checkouton self-hosted runners.How
mktemp -dunder$RUNNER_TEMP(falling back to/tmp). Every reference — the manifest'sbuildoutput, the depot vdf paths inDEPOTS,build_output.log, and the failure-pathls/catof the build logs — now points at that directory.EXITtrapchown -Rs the temp dir to the workspace owner, so nothing root-owned is left for the runner to clean up.manifestoutput still points at the real manifest path, now inside the temp dir.Test
Adds a regression step to
.github/workflows/main.yml: the action runs a second time in the same job, followed by an assertion that the workspace has no unwritable files and no strayBuildOutput.Fixes #79
🤖 Generated with Claude Code
Summary by CodeRabbit