Skip to content

Commit 70b0f1c

Browse files
committed
refactor approval stage workflow
1 parent df6fe42 commit 70b0f1c

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

.github/workflows/main.yml

+10-5
Original file line numberDiff line numberDiff line change
@@ -101,18 +101,24 @@ jobs:
101101
name: Waiting for approval
102102
runs-on: ubuntu-latest
103103
steps:
104+
- name: Generate token
105+
id: generate_token
106+
uses: tibdex/github-app-token@v1
107+
with:
108+
app_id: ${{ secrets.APP_ID }}
109+
private_key: ${{ secrets.APP_SECRET }}
104110
- name: Approve Production Deployment
105111
uses: trstringer/manual-approval@v1
106112
with:
107-
approvers: lambda-feedback/approvers # lambda feedback defined team in organisation
113+
approvers: approvers
108114
minimum-approvals: 1
109115
timeout-minutes: 10
110-
secret: ${{ secrets.GITHUB_TOKEN }}
116+
secret: ${{ steps.generate_token.outputs.token }}
111117
issue-title: Approve Production Deployment
112118
issue-body: Approve production deployment for the Chatbot Module
113119
exclude-workflow-initiator-as-approver: false
114-
additional-approved-words: "fine, go ahead"
115-
additional-denied-words: "deny, to review"
120+
additional-approved-words: "fine, go, approved"
121+
additional-denied-words: "deny, stop"
116122

117123
prod_job:
118124
needs: approval_job
@@ -132,7 +138,6 @@ jobs:
132138
- name: Login to Amazon ECR
133139
id: login-pf-aws-ecr
134140
uses: aws-actions/amazon-ecr-login@v2
135-
136141
- name: Build and push the tagged docker image to Amazon ECR
137142
id: build-custom-image
138143
env:

0 commit comments

Comments
 (0)