Feature/ci magento runtime#303
Conversation
…igger e2e tests steps
|
Hi @damienwebdev, @michielgerritsen, a quick update on the E2E investigation. I've created a separate PR to investigate the Magento runtime side of the problem. The goal is to provide a way of executing bin/magento commands with the correct container, working directory and permissions, independently of the Playwright work. My initial approach was to introduce a new run-magento-command action that wraps the docker exec pattern already used by setup-install. At the moment I haven't managed to get that action to load correctly, so my latest commit falls back to calling docker exec directly from check-store.yml to keep the investigation moving. Question: is the run-magento-command action defined correctly, or am I missing something fundamental about how local actions should be structured or referenced? At the moment GitHub Actions cannot load the action, even though action.yml is present in the repository. Once I understand that part, I think the duplicated docker exec logic could be extracted into a reusable action instead of remaining in the workflow. |
PR Checklist
PR Type
What is the current behavior?
There is currently no reusable way to execute
php bin/magentocommands inside the PHP service container from GitHub Actions workflows.As a result, workflows that need to interact with Magento after installation (for example installing sample data, running setup upgrades or flushing caches) either duplicate Docker logic or execute commands outside the container. This exposes workflows to permission and environment issues that are specific to the container runtime.
Fixes: N/A
What is the new behavior?
This PR introduces a reusable
run-magento-commandaction that executes Magento CLI commands inside the PHP service container.Besides improving reusability, the action encapsulates the runtime concerns of executing Magento commands in the correct context (container, working directory and permissions). This provides a single, consistent mechanism for workflows to interact with Magento rather than requiring each workflow to understand the underlying Docker topology.
The initial motivation is to support the E2E investigation, but the action is intended to be reusable by any workflow requiring Magento CLI access.
Does this PR introduce a breaking change?
Other information
This action was extracted while investigating the E2E Playwright integration. During that work it became apparent that executing Magento CLI commands inside the PHP container is a reusable capability that benefits more than just the E2E workflow.