Maghic is a Swiss army knife tool for GitHub Actions Workflow.
This is created for the GitHub Actions Hackathon: 2021 GitHub Actions Hackathon on DEV
My Workflow
Maghic provides:
- a command line tool for managing, creating and autogenerate Yaml file Workflow for GitHub Actions;
- a set of classes and methods for managing Yaml file (specific for GitHub Actions Workflows).
You can create your GitHub Actions workflow with some code like this one:
$yaml=\App\Objects\YamlObject::make()
->setName("My Test Name")
->setOnPushDefaultBranches()
->addMysqlService()
->addMatrixOsUbuntuLatest()
->toString();
OR you can use a command for:
- Checking the syntax of the workflow file (maghic yaml:check);
- Edit the workflow file with a wizard (maghic yaml:edit);
- Generate automatically the workflow for your project (maghic yaml:guess).
How to generate automatically the workflow
You can create automatically your workflow for your project with the command:
./maghic yaml:guess --save ../yourprojects
Submission Category:
Maintainer Must-Haves
Yaml File or Link to Code
Maghic
Maghic is a Swiss army knife tool for GitHub Actions Workflow.
This project is a W.I.P. for "2021 GitHub Actions Hackathon on DEV". It is not yet completed and it is under development as side project.
It provides:
- a command line tool for managing, creating and autogenerate Yaml file Workflow for GitHub Actions;
- a set of classes and methods for managing Yaml file (specific for GitHub Actions Workflows).
This is created for the GitHub Actions Hackathon: 2021 GitHub Actions Hackathon on DEV
Auto generate workflows
If you want to create automatically a GitHub Actions workflow file you can execute "maghic yaml:guess" command If you want to save the file, you need to use --save option. Amandatory argument is the directory of the project that needs a workflow file. If you want to enable a MySql service, you need to use --mysql option.
./maghic yaml:guess --mysql --save .
ā¦
Additional Resources / Info
This project uses:
- Laravel Zero: micro framework for console application;
- Symfony Yaml: a package for parsing Yaml structures.
- swaggest/json-schema: a package to validate the GitHub Actions workflow.
Code quality packages
- PestPHP: a testing framework for PHP;
- PHPStan: a static code analysis tool for PHP;
- PHP_CodeSniffer: detects violations of a defined set of coding standards (for example PSR2 and PSR12).
Top comments (0)