Skip to content

Commit

Permalink
Use GitHub OIDC provider for auth
Browse files Browse the repository at this point in the history
  • Loading branch information
bnusunny committed Jan 15, 2024
1 parent 5bafeac commit a4a4ead
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions .github/workflows/pipeline.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,14 @@ on:
- released

permissions:
id-token: write # This is required for requesting the JWT
contents: read # This is required for actions/checkout
id-token: write
contents: read

env:
CARGO_TERM_COLOR: always
SAM_TEMPLATE_X86_64: template-x86_64.yaml
SAM_TEMPLATE_ARM64: template-arm64.yaml
GITHUB_RUNNER_ROLE: arn:aws:iam::238946506962:role/GitHubRunnerRole
BETA_STACK_NAME: lambda-adapter-beta
BETA_PIPELINE_EXECUTION_ROLE: arn:aws:iam::477159140107:role/aws-sam-cli-managed-beta-pip-PipelineExecutionRole-13NXRWTRTHDCJ
BETA_CLOUDFORMATION_EXECUTION_ROLE: arn:aws:iam::477159140107:role/aws-sam-cli-managed-beta-CloudFormationExecutionR-132I77VBFOWQ2
Expand Down Expand Up @@ -144,8 +145,14 @@ jobs:
python-version: "3.8"
- uses: aws-actions/setup-sam@v2

- name: Assume the github runner role
uses: aws-actions/configure-aws-credentials@v4
with:
aws-region: ${{ env.BETA_REGION }}
role-to-assume: ${{ env.GITHUB_RUNNER_ROLE }}

- name: Assume the beta pipeline user role
uses: aws-actions/configure-aws-credentials@v3
uses: aws-actions/configure-aws-credentials@v4
with:
aws-region: ${{ env.BETA_REGION }}
role-to-assume: ${{ env.BETA_PIPELINE_EXECUTION_ROLE }}
Expand Down

0 comments on commit a4a4ead

Please sign in to comment.