Skip to content

BCDA-8680: Refactor to allow for ipv6 addresses (#199) #2

BCDA-8680: Refactor to allow for ipv6 addresses (#199)

BCDA-8680: Refactor to allow for ipv6 addresses (#199) #2

name: WAF Sync Lambda Dev Deploy
on:
workflow_call:
workflow_dispatch:
push:
branches:
- main
paths:
- lambda/wafsync/**
- .github/workflows/waf-sync-lambda-dev-deploy.yml
jobs:
deploy-to-dev:
permissions:
contents: read
id-token: write
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./lambda/wafsync
environment: dev
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
- name: Build WAF Sync Lambda zip file
env:
CGO_ENABLED: 0
run: |
go build -o bootstrap main.go db.go aws.go
zip function.zip bootstrap
- uses: aws-actions/configure-aws-credentials@v4
with:
aws-region: ${{ vars.AWS_REGION }}
role-to-assume: arn:aws:iam::${{ secrets.ACCOUNT_ID }}:role/delegatedadmin/developer/bcda-dev-github-actions
- name: Upload and reload
run: |
aws s3 cp --no-progress function.zip \
s3://bcda-dev-api-waf-sync-function/function-${{ github.sha }}.zip
aws lambda update-function-code --function-name bcda-dev-api-waf-sync \
--s3-bucket bcda-dev-api-waf-sync-function --s3-key function-${{ github.sha }}.zip