diff --git a/.github/workflows/pull-request-build.yaml.yml b/.github/workflows/pull-request-build.yml similarity index 73% rename from .github/workflows/pull-request-build.yaml.yml rename to .github/workflows/pull-request-build.yml index bf3e8921f3f..5d1baea5677 100644 --- a/.github/workflows/pull-request-build.yaml.yml +++ b/.github/workflows/pull-request-build.yml @@ -10,13 +10,10 @@ concurrency: env: # constants + IAM_ROLE_ARN: 'arn:aws:iam::246442084943:role/AwsSdkCppGitHubRole' DOWNLOAD_FOLDER: '.build-scripts/' SCRIPT_LOCATION: 'workflows/start-pull-request-build/pull-request-build-v1.sh' - # custom variables - IAM_ROLE_ARN: 'AwsSdkCppGitHubRole' - ROLE_SESSION_DURATION_SECONDS: 7200 - jobs: aws-sdk-pr-build: if: github.event.review.state == 'approved' @@ -30,10 +27,11 @@ jobs: - name: Configure AWS Credentials uses: aws-actions/configure-aws-credentials@main with: - role-to-assume: '$IAM_ROLE_ARN' + role-to-assume: ${{ env.IAM_ROLE_ARN }} role-session-name: PullRequestBuildGitHubAction - role-duration-seconds: '$ROLE_SESSION_DURATION_SECONDS' + aws-region: us-west-2 + role-duration-seconds: 7200 - name: Download Build Script run: | aws s3 cp s3://aws-sdk-builds-github-assets-prod-us-west-2/$SCRIPT_LOCATION ./$DOWNLOAD_FOLDER/$SCRIPT_LOCATION --no-progress @@ -41,14 +39,11 @@ jobs: - name: Build env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - REPO: ${{ github.repository }} HEAD_REF: ${{ github.event.pull_request.head.ref }} - PR_NUMBER: ${{ github.event.pull_request.number }} - RUN_ID: ${{ github.run_id }} run: | ./$DOWNLOAD_FOLDER/$SCRIPT_LOCATION \ - --repo "$REPO" \ + --repo "${{ github.repository }}" \ --branch "$HEAD_REF" \ - --pr-number "$PR_NUMBER" \ - --run-id "$RUN_ID" + --pr-number "${{ github.event.pull_request.number }}" \ + --run-id "${{ github.run_id }}" timeout-minutes: 180 diff --git a/.github/workflows/simple-build.yml b/.github/workflows/simple-build.yml deleted file mode 100644 index 6eed3f19b42..00000000000 --- a/.github/workflows/simple-build.yml +++ /dev/null @@ -1,32 +0,0 @@ -name: simple-build - -on: - pull_request: - types: [opened, synchronize] - branches: - - main - -jobs: - simple-build: - runs-on: ubuntu-latest - steps: - - name: dependencies - run: | - sudo apt-get update - sudo apt-get install zlib1g-dev libssl-dev libcurl4-openssl-dev - - name: checkout - uses: actions/checkout@v2 - with: - path: aws-sdk-cpp - submodules: recursive - - name: configure - run: | - cd aws-sdk-cpp - mkdir build - cd build - cmake -DBUILD_ONLY="s3;s3-crt;dynamodb;logs;kms;sqs;firehose;kinesis;sns;mediastore;mediastore-data;monitoring;secretsmanager;athena;kafka;cognito-idp;rds;ecs" .. - - name: build - run: | - cd aws-sdk-cpp/build - cmake --build . -