Generally speaking, you can get very close to what you have above in GitHub actions. You'd trigger a workflow based on push
and pull_request
events so that it triggers when someone pushes to your repository, then you'd define each of your jobs. You would then use the needs
syntax to define dependencies instead of stages (which is similar to the 14.2 needs
syntax from GitLab), so for example your auto-deploy
job would have needs: [test1, test2]
.
The one thing you will not be able to replicate is the manual wait on pushing to production. GitHub actions does not have the ability to pause at a job step and wait for a manual action. You can typically work around this by running workflows based on the release
event, or by using a manual kick-off of the whole pipeline with a given variable set.
When looking at how to handle artifacts, check out the answer in this other stack overflow question: Github actions share workspace/artifacts between jobs?