Remove docker-run-action#195
Conversation
📝 WalkthroughSummary by CodeRabbit
WalkthroughThe GitHub Actions workflow file is modified to refactor the musllinux test wheels step. The change replaces an external docker-run-action action with an inline docker run command. The new implementation mounts the repository, sets the PACKAGE_NAME environment variable, installs Python, creates a virtual environment, installs the package from the dist directory, and executes the package with the --help flag within a single docker invocation. Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes 🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches🧪 Generate unit tests (beta)
Tip Issue Planner is now in beta. Read the docs and try it out! Share your feedback on Discord. 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 |
There was a problem hiding this comment.
🤖 Fix all issues with AI agents
Verify each finding against the current code and only fix it if needed.
In @.github/workflows/release-build-binaries.yml:
- Around line 221-227: The docker run invocation includes an unnecessary --env
PACKAGE_NAME flag because ${PACKAGE_NAME} is expanded by the workflow runner
into the sh -c string; remove the --env PACKAGE_NAME argument from the docker
run command so the command uses the baked-in ${PACKAGE_NAME} expansion, leaving
the rest of the run block (apk add python3; python -m venv .venv; .venv/bin/pip3
install ${PACKAGE_NAME} --no-index --find-links dist/ --force-reinstall;
.venv/bin/${PACKAGE_NAME} --help;) unchanged.
🧹 Nitpick comments (1)
🤖 Fix all nitpicks with AI agents
Verify each finding against the current code and only fix it if needed. In @.github/workflows/release-build-binaries.yml: - Around line 221-227: The docker run invocation includes an unnecessary --env PACKAGE_NAME flag because ${PACKAGE_NAME} is expanded by the workflow runner into the sh -c string; remove the --env PACKAGE_NAME argument from the docker run command so the command uses the baked-in ${PACKAGE_NAME} expansion, leaving the rest of the run block (apk add python3; python -m venv .venv; .venv/bin/pip3 install ${PACKAGE_NAME} --no-index --find-links dist/ --force-reinstall; .venv/bin/${PACKAGE_NAME} --help;) unchanged..github/workflows/release-build-binaries.yml (1)
221-227:--env PACKAGE_NAMEis redundant here.Since
${PACKAGE_NAME}inside the double-quotedsh -c "..."argument is expanded by the runner's bash shell (from the workflow-levelenv), it is resolved beforedocker runis invoked. The--env PACKAGE_NAMEflag passes the variable into the container's environment, but nothing inside the container actually reads it — the values are already baked into the command string.Not a bug, but removing it avoids confusion about where the variable is resolved.
Suggested cleanup
- docker run --rm -v ${{ github.workspace }}:/io -w /io --env PACKAGE_NAME alpine:latest sh -c " + docker run --rm -v ${{ github.workspace }}:/io -w /io alpine:latest sh -c "🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.github/workflows/release-build-binaries.yml around lines 221 - 227, The docker run invocation includes an unnecessary --env PACKAGE_NAME flag because ${PACKAGE_NAME} is expanded by the workflow runner into the sh -c string; remove the --env PACKAGE_NAME argument from the docker run command so the command uses the baked-in ${PACKAGE_NAME} expansion, leaving the rest of the run block (apk add python3; python -m venv .venv; .venv/bin/pip3 install ${PACKAGE_NAME} --no-index --find-links dist/ --force-reinstall; .venv/bin/${PACKAGE_NAME} --help;) unchanged.
copied from astral-sh/ruff#23254
Should fix ci failing in every pr's