add gha permissions for oidc #3
Workflow file for this run
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
on: | |
pull_request: | |
push: | |
branches: [main, test-me-*] | |
permissions: | |
contents: read | |
id-token: write | |
jobs: | |
main: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: 3.x | |
- run: pip install cargo-lambda | |
- uses: actions-rust-lang/setup-rust-toolchain@v1 | |
- run: cargo lambda build --release --output-format zip | |
- uses: aws-actions/[email protected] | |
with: | |
role-to-assume: 'arn:aws:iam::048899320783:role/awc_wideo_bot_deploy' | |
aws-region: us-east-1 | |
if: github.event_name == 'push' | |
- run: | | |
aws lambda \ | |
update-function-code --function-name awc_wideo_bot \ | |
--zip fileb://target/lambda/awc-wideo-bot/bootstrap.zip | |
if: github.event_name == 'push' |