Saturday, 6 June 2026

Environment Deployment Approvals for GitHub Action Workflow

 In GitHub actvaions workflows we can use environments to scope varibles and protection rules. Let's compare Azure DevOps pipeline environments to GitHub Actions workflow environments, differences regarding environment deployment approvals, in this post.

An environment can be configured for approvals as shown below.


There are only limited options here. In Azure devops we coud set expiration to approval and if not approved within given time pipeline step stops and skipps and waits there. We could retrigger by rerun stage and then reapprove it within given wait time. Such wait time coule be from minutes to 30 days etc.
However, in GitHub the enviroment WaitTime only works as a delay after or before approval and has no real effect other than when approved immidiately it can delay actual deploy action upto configure wait time.

As example say if we set wait time as 1 minute here.


Then environment job just start counting time while it is waiting for apporaval as shown below.


So if we approve just right now, the deployment will start after 33 seconds. Let's say we wait it is done the time counting then we approve deployment starts immediately.


No pending wait. Once approved it will deploy immediately.



Now, let's try an approval before timeout is done. Then see what happens-.


In this case it waits after approval, the remaining time of one minute. So this is the only useful case, when we want to delay a deployment once approval also in place. This is useful to set a deployment to start after few hours say at a maintenanace window comes later in the night, the approva can pre approve and let it run in the desired time slot.

But this is not at all as sophissticated as approval checks in Azure devops pipelines. Wehre we could timout approvalø interval. Restarts staage to start timer again.

Addionally, the GitHub wait in env is getting applied to all steps as it is not possible to share variables to mutiple environments without a duplication, so we have stay with one environment, for all stages in multi stage pipeline targeting a single environment. In Azure pipelines varaible groups are shared and can be used in muti stage pipeline across mutiple stage based environments defined, so can have diffrent approval timings. So, if we are moving from Azure Pipelines to GitHub actions we have to live with the limitations as described in "Mapping Azure DevOps Multi-Stage Pipelines to GitHub Actions - Part 1".

No comments:

Popular Posts