Skip to content

Use single action entrypoint#128

Merged
j178 merged 1 commit into
mainfrom
single-entrypoint
Apr 29, 2026
Merged

Use single action entrypoint#128
j178 merged 1 commit into
mainfrom
single-entrypoint

Conversation

@j178

@j178 j178 commented Apr 29, 2026

Copy link
Copy Markdown
Owner

Use the same bundled action entrypoint for both the main and post phases.

@j178 j178 added the enhancement New feature or request label Apr 29, 2026
@j178 j178 marked this pull request as ready for review April 29, 2026 03:44
Copilot AI review requested due to automatic review settings April 29, 2026 03:44
@j178 j178 merged commit 6ad8027 into main Apr 29, 2026
13 checks passed
@j178 j178 deleted the single-entrypoint branch April 29, 2026 03:48

Copilot AI left a comment

Copy link
Copy Markdown

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 consolidates the GitHub Action’s main and post execution into a single bundled entrypoint (dist/index.cjs), using Action state to decide whether to run the main phase or the post-cache-save phase.

Changes:

  • Route both runs.main and runs.post in action.yml to dist/index.cjs.
  • Move the post-step logic into src/main.ts (runPost() + state-based dispatch) and remove the separate src/post.ts/bundle entry.
  • Extend tests to cover runPost() being callable and invoking cache save.

Reviewed changes

Copilot reviewed 7 out of 9 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
test/main.test.ts Adds mocks/state support and a runPost() unit test.
src/types.ts Introduces POST_ACTION_STATE constant for main/post dispatch.
src/post.ts Removes the standalone post entrypoint implementation.
src/main.ts Adds runPost() and state-based dispatch between main vs post behavior.
scripts/build-dist.mjs Stops bundling a separate dist/post/index.cjs output.
dist/index.cjs Updated bundled output to include post path + cache-save logic.
action.yml Points post to the same entrypoint as main.
CONTRIBUTING.md Updates docs to reflect the single bundled entrypoint.

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

Comment thread test/main.test.ts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants