opt-out-export prod deploy #6
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: opt-out-export prod deploy | |
on: | |
workflow_dispatch: | |
jobs: | |
deploy: | |
permissions: | |
contents: read | |
id-token: write | |
runs-on: ubuntu-latest | |
environment: prod | |
steps: | |
- 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-prod-github-actions | |
- name: Promote lambda code from test to prod | |
run: | | |
aws s3 cp --no-progress \ | |
s3://dpc-test-opt-out-export-function/function-${{ github.sha }}.zip \ | |
s3://dpc-prod-opt-out-export-function/function-${{ github.sha }}.zip | |
aws lambda update-function-code --function-name dpc-prod-opt-out-export \ | |
--s3-bucket dpc-prod-opt-out-export-function --s3-key function-${{ github.sha }}.zip |