Skip to content

Cmyers launchpad refactor#20

Merged
runleveldev merged 3 commits into
mainfrom
cmyers_launchpad-refactor
Jun 19, 2026
Merged

Cmyers launchpad refactor#20
runleveldev merged 3 commits into
mainfrom
cmyers_launchpad-refactor

Conversation

@cmyers-mieweb

Copy link
Copy Markdown
Collaborator

This pull request significantly refactors the action.yml workflow for the MIEWeb LaunchPad action, modularizing the logic for container management by delegating API calls to reusable composite actions from mieweb/opensource-server/.github/actions. The workflow is now more maintainable, robust, and easier to extend, with clearer separation of concerns for event classification, container lifecycle management, and reporting.

Key changes include:

Workflow modularization and delegation:

  • Replaces in-line bash logic for container creation, deletion, and status querying with calls to reusable composite actions: get-container, create-container, and delete-container. This reduces code duplication and centralizes API interaction logic. [1] [2]

Improved event handling and classification:

  • Introduces a dedicated "Classify Event" step to determine whether the workflow should manage or delete a container, based on the event type and action (e.g., branch deletion, PR closed).

Container lifecycle management:

  • Splits container management into distinct phases: preparation (naming/template normalization), locating existing containers, planning create/recreate/delete actions, and executing them via composite actions. Adds explicit planning logic to decide when to delete and/or create containers. [1] [2]
  • Adds robust handling for container deletion on branch deletion or PR closure, including checks for container existence and clearer reporting if no container is found.

Status reporting and error handling:

  • Refactors status querying and reporting to use the composite get-container action, improving reliability and simplifying error handling. Adds a dedicated reporting step with clearer output and error messages if containers are not found or not running.

Documentation and metadata:

  • Updates the action description and adds detailed comments explaining the LaunchPad orchestrator’s purpose and pinning strategy for composite actions.

Replace inlined curl/jq logic with reusable composite actions (get-container, create-container, delete-container, wait-for-job) and reorganize control flow. Add an event classification step to decide manage vs delete, introduce a prepare step to build container name/template, and a planning step to determine create/recreate/delete actions. Update metadata and header docs to explain LaunchPad behavior and pinning constraints. Overall this makes the action more modular, easier to maintain, and avoids duplicating API and polling logic.
Replace inlined curl/jq logic with reusable composite actions (get-container, create-container, delete-container, wait-for-job) and reorganize control flow. Add an event classification step to decide manage vs delete, introduce a prepare step to build container name/template, and a planning step to determine create/recreate/delete actions. Update metadata and header docs to explain LaunchPad behavior and pinning constraints. Overall this makes the action more modular, easier to maintain, and avoids duplicating API and polling logic.
Comment thread action.yml
Comment thread action.yml
Remove the long inlined bash polling step and an earlier pinning comment, and delegate job-wait logic to the reusable action mieweb/opensource-server/.github/actions/wait-for-job@latest. The new step forwards api_url, api_key and job_id inputs instead of embedding curl/jq polling logic, simplifying the action and centralizing maintenance.
@runleveldev runleveldev merged commit 0e41341 into main Jun 19, 2026
@runleveldev runleveldev deleted the cmyers_launchpad-refactor branch June 19, 2026 21:04
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.

2 participants