For debugging pipeline, it is common to save, push and execute pipeline manually. However it is not a good idea because it might increase unnecessary commit and pull request in branch. It can be solved by run the pipeline locally to ensure everything correct before push and execute. In this demo, it will execute GitHub action locally in Windows.
Prerequisites
- Ensure required windows feature are installed properly.
In Windows feature, ensure Hyper-V, Virtual Machine Platform and Windows Subsystem for Linux are checked, if not, tick missing items and click OK to install it. Restart computer after installed.
- Ensure required packages are installed.
Check docker engine install or not; install it and restart computer if missing;
Steps
- Install act
Execute command in Terminal below to install act. Or you can follow act user guide to install in another way.choco install act-cli
- Execute and verify
Execute command in Terminal below, expected it can executed successfully if step do not required specific credentials.act --pull=false
Reference
- act user guide, nektosact, https://nektosact.com/
Leave a Reply