fix: repair main CI and automate action publication#13
Conversation
Signed-off-by: Michael Kantor <6068672+kantorcodes@users.noreply.github.com>
Code Review SummaryStatus: 1 Issue Found | Recommendation: Address before merge Overview
Issue Details (click to expand)WARNING
Resolved from Previous Review
Files Reviewed (4 files)
Fix these issues in Kilo Cloud Reviewed by mimo-v2-pro-20260318 · 251,390 tokens |
There was a problem hiding this comment.
Code Review
This pull request updates the license badge in the README to a static Apache 2.0 version and refactors the action bundle documentation tests to consolidate checks within the action's README. It also removes a specific version hash check for the setup-python action and adds a new test to verify the license badge update. I have no feedback to provide.
Signed-off-by: Michael Kantor <6068672+kantorcodes@users.noreply.github.com>
Signed-off-by: Michael Kantor <6068672+kantorcodes@users.noreply.github.com>
| GH_TOKEN: ${{ secrets.ACTION_REPO_TOKEN }} | ||
| ACTION_REPOSITORY: ${{ inputs.action_repository != '' && inputs.action_repository || vars.ACTION_REPOSITORY != '' && vars.ACTION_REPOSITORY || 'hashgraph-online/hol-codex-plugin-scanner-action' }} | ||
| RELEASE_TAG: ${{ github.event.release.tag_name || inputs.release_tag }} | ||
| CREATE_REPOSITORY: ${{ github.event_name == 'workflow_dispatch' && inputs.create_repository || 'true' }} |
There was a problem hiding this comment.
WARNING: CREATE_REPOSITORY expression always evaluates to 'true' — the create_repository input has no effect
In GitHub Actions expressions, false && <expr> || 'true' always returns 'true' because the && returns false (falsy), then || falls through to the string 'true'. When triggered via workflow_dispatch with create_repository: false:
github.event_name == 'workflow_dispatch'→truetrue && inputs.create_repository→false(boolean input is falsy)false || 'true'→'true'(the fallback always wins)
This means the "Create the dedicated action repository if it does not exist" toggle is non-functional — the workflow will always attempt to create the repo.
To fix, coerce the boolean to a string before the || fallback:
| CREATE_REPOSITORY: ${{ github.event_name == 'workflow_dispatch' && inputs.create_repository || 'true' }} | |
| CREATE_REPOSITORY: ${{ github.event_name == 'workflow_dispatch' && inputs.create_repository || false || 'true' }} |
A cleaner alternative: use fromJSON() or a ternary-style pattern like ${{ inputs.create_repository == false && 'false' || 'true' }}.
Purpose
mainCI run after the marketplace guide purgeWhat Changed
tests/test_action_bundle.pyso it no longer depends on the deleteddocs/github-action-marketplace.mdLICENSE.github/workflows/publish-action-repo.ymlto publish the root-ready action bundle into a dedicated public action repositoryhashgraph-online/hol-codex-plugin-scanner-action, syncaction.yml/README.md/LICENSE/SECURITY.md, pushvX.Y.Zandv1, and create or update the action-repo releaseREADME.mdandaction/README.mdRequired Repo Configuration
ACTION_REPO_TOKENACTION_REPOSITORYhashgraph-online/hol-codex-plugin-scanner-actionVerification
yq '.' .github/workflows/publish-action-repo.yml >/dev/null./.venv/bin/python -c 'import sys; sys.path.insert(0,"src"); import pytest; raise SystemExit(pytest.main(["tests/test_action_bundle.py","-q"]))'./.venv/bin/ruff check src tests./.venv/bin/python -c 'import sys; sys.path.insert(0,"src"); import pytest; raise SystemExit(pytest.main(["-q"]))'./.venv/bin/python -m buildNotes