Skip to content

Commit 6328bd7

Browse files
authored
sync(integration): aws-lambda-auto-approval (#6)
FolderOrigin-RevId: /home/runner/work/integrations/integrations/.
1 parent 407a774 commit 6328bd7

File tree

2 files changed

+31
-5
lines changed

2 files changed

+31
-5
lines changed

.github/workflows/deploy.yaml

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: deploy.webhook
1+
name: deploy
22
on:
33
push:
44
branches:
@@ -8,8 +8,34 @@ on:
88
env:
99
AWS_REGION: us-west-2
1010
jobs:
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

main.tf

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff 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

1616
module "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

0 commit comments

Comments
 (0)