From 0b756e40e8364e12a0064baa2a2e9135c47cd302 Mon Sep 17 00:00:00 2001 From: Ruge Li <91452427+rugeli@users.noreply.github.com> Date: Thu, 22 Aug 2024 11:25:14 -0700 Subject: [PATCH] Update workflow to access aws for dependabot (#281) * add aws access for dependabot pr * test * syntax tested * specify job names --- .github/workflows/analyze.yml | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/.github/workflows/analyze.yml b/.github/workflows/analyze.yml index d34cb5b5..5cbe0837 100644 --- a/.github/workflows/analyze.yml +++ b/.github/workflows/analyze.yml @@ -1,10 +1,10 @@ name: Analyze -on: - push: - branches: - - main - pull_request: +on: + push: + branches: + - main + pull_request: jobs: Analyze: @@ -45,7 +45,15 @@ jobs: needs: [Analyze] steps: - uses: actions/checkout@v4 + - name: Configure AWS credentials for dependabot + if: ${{ github.actor == 'dependabot[bot]' }} + uses: aws-actions/configure-aws-credentials@v4 + with: + aws-access-key-id: ${{ secrets.DEPENDABOT_AWS_ACCESS_KEY_ID }} + aws-secret-access-key: ${{ secrets.DEPENDABOT_AWS_SECRET_ACCESS_KEY }} + aws-region: us-west-2 - name: Configure AWS credentials + if: ${{ github.actor != 'dependabot[bot]' }} uses: aws-actions/configure-aws-credentials@v4 with: aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}