File tree Expand file tree Collapse file tree 2 files changed +31
-5
lines changed Expand file tree Collapse file tree 2 files changed +31
-5
lines changed Original file line number Diff line number Diff line change 1- name : deploy.webhook
1+ name : deploy
22on :
33 push :
44 branches :
88env :
99 AWS_REGION : us-west-2
1010jobs :
11+ validate :
12+ name : Validate
13+ runs-on : ubuntu-latest
14+ outputs :
15+ status : ${{ steps.early.outputs.status }}
16+ steps :
17+ - name : Checkout
18+ uses : actions/checkout@v3
19+ - id : Envcheck
20+ name : Check environment variables
21+ env :
22+ AWS_ACCESS_KEY_ID : ${{ secrets.AWS_ACCESS_KEY_ID }}
23+ AWS_SECRET_ACCESS_KEY : ${{ secrets.AWS_SECRET_ACCESS_KEY }}
24+ INDENT_WEBHOOK_SECRET : ${{ secrets.INDENT_WEBHOOK_SECRET }}
25+ run : |
26+ status="deploy"
27+ if [ "$AWS_ACCESS_KEY_ID" == "" ] ||
28+ [ "$AWS_SECRET_ACCESS_KEY" == "" ] ||
29+ [ "$INDENT_WEBHOOK_SECRET" == "" ]
30+ then
31+ status="skip"
32+ echo "Missing required enviroment variable(s)"
33+ fi
34+ echo "status=$status" >> $GITHUB_OUTPUT
1135 terraform :
1236 name : Terraform
37+ needs : validate
38+ if : needs.validate.outputs.status == 'deploy'
1339 runs-on : ubuntu-latest
1440 steps :
1541 - name : Checkout
Original file line number Diff line number Diff line change @@ -10,17 +10,17 @@ terraform {
1010
1111# Indent + Auto-approval Integration
1212
13- # Details: https://github.com/indentapis/integrations/tree/f494cef86094c3b40ac124e3159f5f3391c7e6c8 /packages/stable/indent-integration-auto-approval
14- # Last Change: https://github.com/indentapis/integrations/commit/f494cef86094c3b40ac124e3159f5f3391c7e6c8
13+ # Details: https://github.com/indentapis/integrations/tree/df7a83d97d7220dc20566871e81d90a20ec160e0 /packages/stable/indent-integration-auto-approval
14+ # Last Change: https://github.com/indentapis/integrations/commit/df7a83d97d7220dc20566871e81d90a20ec160e0
1515
1616module "idt-auto-approval-webhook" {
1717 source = " git::https://github.com/indentapis/integrations//terraform/modules/indent_runtime_aws_lambda"
1818 name = " idt-auto-approval-webhook"
1919 indent_webhook_secret = var. indent_webhook_secret
2020 artifact = {
2121 bucket = " indent-artifacts-us-west-2"
22- function_key = " webhooks/aws/lambda/auto-approval-f494cef86094c3b40ac124e3159f5f3391c7e6c8 -function.zip"
23- deps_key = " webhooks/aws/lambda/auto-approval-f494cef86094c3b40ac124e3159f5f3391c7e6c8 -deps.zip"
22+ function_key = " webhooks/aws/lambda/auto-approval-df7a83d97d7220dc20566871e81d90a20ec160e0 -function.zip"
23+ deps_key = " webhooks/aws/lambda/auto-approval-df7a83d97d7220dc20566871e81d90a20ec160e0 -deps.zip"
2424 }
2525 env = {
2626 AUTO_APPROVAL_DURATION = var.auto_approval_duration
You can’t perform that action at this time.
0 commit comments