Skip to content

opt-out-import test deploy #5

opt-out-import test deploy

opt-out-import test deploy #5

name: opt-out-import test deploy
on:
workflow_call:
workflow_dispatch:
jobs:
test:
permissions:
contents: read
id-token: write
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./lambda/opt-out-import
environment: test
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
- name: Build opt-out-import zip file
env:
CGO_ENABLED: 0
run: |
go build -o bootstrap main.go parsers.go utils.go models.go db.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/dpc-test-github-actions
- name: Upload and reload
run: |
aws s3 cp --no-progress function.zip \
s3://dpc-test-opt-out-import-function/function-${{ github.sha }}.zip
aws lambda update-function-code --function-name dpc-test-opt-out-import \
--s3-bucket dpc-test-opt-out-import-function --s3-key function-${{ github.sha }}.zip