update workflows to use new github oidc connection #26
Workflow file for this run
This file contains hidden or 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: NET 6 | ||
permissions: | ||
id-token: write | ||
contents: read | ||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- src/NET6/** | ||
env: | ||
AWS_REGION : eu-west-1 | ||
permissions: | ||
id-token: write # This is required for requesting the JWT | ||
contents: read # This is required for actions/checkout | ||
jobs: | ||
build-deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: checkoutRepo | ||
uses: actions/checkout@v2 | ||
- name: Build and Deploy | ||
uses: ./.github/actions/sam-build-and-deploy | ||
with: | ||
dotnet-version: '6.x' | ||
template-file-path: ./src/NET6/template.yaml | ||
stack-name: net-6-base | ||
s3-bucket-name: aws-dotnet-lambda-testing | ||
load-test-arm: | ||
needs: build-deploy | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: configure aws credentials | ||
uses: aws-actions/configure-aws-credentials@v2 | ||
with: | ||
role-to-assume: ${{ secrets.AWS_LOAD_TEST_RUNNER_ROLE }} | ||
role-session-name: GitHub_to_AWS_via_FederatedOIDC | ||
aws-region: ${{ secrets.AWS_REGION }} | ||
- name: checkoutRepo | ||
uses: actions/checkout@v2 | ||
- name: Run Load Tests | ||
uses: ./.github/actions/run-load-test | ||
with: | ||
api-endpoint: ${{ secrets.API_ENDPOINT_NET_6_ARM }} | ||
load-test-x86: | ||
needs: build-deploy | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: configure aws credentials | ||
uses: aws-actions/configure-aws-credentials@v2 | ||
with: | ||
role-to-assume: ${{ secrets.AWS_LOAD_TEST_RUNNER_ROLE }} | ||
role-session-name: GitHub_to_AWS_via_FederatedOIDC | ||
aws-region: ${{ secrets.AWS_REGION }} | ||
- name: checkoutRepo | ||
uses: actions/checkout@v2 | ||
- name: Run Load Tests | ||
uses: ./.github/actions/run-load-test | ||
with: | ||
api-endpoint: ${{ secrets.API_ENDPOINT_NET_6_X86 }} | ||
generate-report-arm: | ||
needs: [load-test-arm] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: configure aws credentials | ||
uses: aws-actions/configure-aws-credentials@v2 | ||
with: | ||
role-to-assume: ${{ secrets.AWS_LOAD_TEST_RUNNER_ROLE }} | ||
role-session-name: GitHub_to_AWS_via_FederatedOIDC | ||
aws-region: ${{ secrets.AWS_REGION }} | ||
- name: checkoutRepo | ||
uses: actions/checkout@v2 | ||
- name: Generate reports | ||
uses: ./.github/actions/generate-report | ||
with: | ||
api-endpoint: ${{ secrets.API_ENDPOINT_NET_6_ARM }} | ||
output-report-file-name: net-6-arm-output.md | ||
generate-report-x86: | ||
needs: [load-test-x86] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: configure aws credentials | ||
uses: aws-actions/configure-aws-credentials@v2 | ||
with: | ||
role-to-assume: ${{ secrets.AWS_LOAD_TEST_RUNNER_ROLE }} | ||
role-session-name: GitHub_to_AWS_via_FederatedOIDC | ||
aws-region: ${{ secrets.AWS_REGION }} | ||
- name: checkoutRepo | ||
uses: actions/checkout@v2 | ||
- name: Generate reports | ||
uses: ./.github/actions/generate-report | ||
with: | ||
api-endpoint: ${{ secrets.API_ENDPOINT_NET_6_X86 }} | ||
output-report-file-name: net-6-x86-output.md |