The github:workflow command generates basic GitHub workflow templates for various actions such as PHPUnit testing, deployment to Amazon ECS, deployment to Google Kubernetes Engine, and Terraform deployment.
vendor/bin/whitecat github:workflow
The command does not accept any additional options or arguments. It provides an interactive interface to choose the desired workflow actions.
To execute the github:workflow command, run the following:
vendor/bin/whitecat github:workflow
The command performs the following tasks:
- Checks for the existence of the GitHub workflow directory. If it doesn't exist, it creates the directory.
- Allows the user to choose specific workflow actions or select "All" to generate all available workflows.
- Copies the selected workflow files to the specified distribution directory.
The user can choose from the following workflow options:
- PHPUnit & Coverage (CodeCov)
- Deploy to Amazon ECS
- Deploy to Google Kubernetes Engine
- Terraform Deploy
- All
The command prompts the user for confirmation in the following scenarios:
- If the GitHub workflow directory already exists, the user can choose to continue and override it.
- If any of the workflow templates already exist, the user can choose to override them.
Upon successful execution, the command outputs a success message.
If any errors occur during file or directory creation, appropriate error messages are displayed.