Skip to content

Bump the aws-sdk-go group with 5 updates (#45) #112

Bump the aws-sdk-go group with 5 updates (#45)

Bump the aws-sdk-go group with 5 updates (#45) #112

Workflow file for this run

name: "Build and Deploy"
on:
push:
branches:
- main
pull_request:
permissions:
id-token: write
contents: read
jobs:
build:
name: Build and Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
- run: go mod download
- run: go mod tidy && git diff --exit-code go.mod go.sum
- run: go vet ./...
- run: mkdir -p build/bin
- run: go build -tags "lambda.norpc timetzdata" -v -o build/bin/harvestcalls/bootstrap lambdas/harvestcalls/main.go
- run: go build -tags "lambda.norpc timetzdata" -v -o build/bin/active_call_notifier/bootstrap lambdas/active_call_notifier/main.go
- run: go run github.com/onsi/ginkgo/v2/ginkgo -github-output -r -randomize-all -randomize-suites -race -trace -fail-on-pending -keep-going -poll-progress-after=10s -poll-progress-interval=10s
- uses: actions/upload-artifact@v4
with:
name: build
path: build/bin
terraform:
name: "Terraform Deployment"
environment: prod
needs: build
runs-on: ubuntu-latest
defaults:
run:
working-directory: terraform
env:
TF_VAR_CPD_API_KEY: ${{ secrets.CPD_API_KEY }}
TF_VAR_CFD_API_KEY: ${{ secrets.CFD_API_KEY }}
TF_VAR_SMS_FROM: ${{ secrets.SMS_FROM }}
TF_VAR_SMS_TO: ${{ secrets.SMS_TO }}
TF_VAR_TWILIO_ACCOUNT_SID: ${{ secrets.TWILIO_ACCOUNT_SID }}
TF_VAR_TWILIO_API_KEY: ${{ secrets.TWILIO_API_KEY }}
TF_VAR_TWILIO_API_SECRET: ${{ secrets.TWILIO_API_SECRET }}
TF_VAR_STREET_NAMES: ${{ secrets.STREET_NAMES }}
TF_VAR_OPS_EMAIL: ${{ secrets.OPS_EMAIL }}
steps:
- uses: actions/checkout@v4
- uses: aws-actions/configure-aws-credentials@v4
with:
mask-aws-account-id: true
aws-region: us-east-1
role-to-assume: arn:aws:iam::${{ secrets.AWS_ACCOUNT_NUMBER }}:role/cfactivecallmonitor-ci
- uses: hashicorp/setup-terraform@v3
with:
terraform_version: 1.10
- run: terraform fmt -check
- run: terraform init
- run: terraform validate -no-color
- uses: actions/download-artifact@v4
with:
name: build
path: build/bin
- run: terraform plan -no-color
if: github.event_name == 'pull_request'
- run: terraform apply -auto-approve
if: github.ref == 'refs/heads/main' && github.event_name == 'push'