It would be very useful to add an environment attribute in the workflow yml file for deploy jobs. Then it will enable user to config manual approval if needed.
How it works.
We add an environment section in the workflow file like below
jobs:
cdk_diff:
runs-on: ubuntu-latest
steps:
...
deploy_to_dev:
needs: cdk_diff
environment: <--- environment for deploying to development job
name: development
runs-on: ubuntu-latest
steps:
...
deploy_to_staging:
needs: deploy_to_dev
environment: <--- environment for deploying to staging job
name: staging
runs-on: ubuntu-latest
steps:
...
At this stage, those extra environment attributes won't introduce any side effects or breaking changes.
Secondly, in github -> settings -> environment page, we create two github.com environments with the same names (development and staging) like below

After this step, nothing won't happen until we configure the environment like the below screenshot.

Here, in the staging environment, I ticked the required reviewers and assign my username to it. after saving the change, the workflow will block in the deploy to staging step and ask me to approve it.


Here is the working repository
So in #160, I added the environment attribute based on the stage name for the deploy jobs. Then it will give the user the ability to add manual approval if needed.
Please let me know if you have any further questions.
It would be very useful to add an environment attribute in the workflow yml file for deploy jobs. Then it will enable user to config manual approval if needed.
How it works.
We add an environment section in the workflow file like below
At this stage, those extra environment attributes won't introduce any side effects or breaking changes.
Secondly, in github -> settings -> environment page, we create two github.com environments with the same names (development and staging) like below

After this step, nothing won't happen until we configure the environment like the below screenshot.



Here, in the staging environment, I ticked the required reviewers and assign my username to it. after saving the change, the workflow will block in the deploy to staging step and ask me to approve it.
Here is the working repository
So in #160, I added the environment attribute based on the stage name for the deploy jobs. Then it will give the user the ability to add manual approval if needed.
Please let me know if you have any further questions.