Fix CRT S3 getObject file handling #2124
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: Build SDK | |
| on: | |
| merge_group: | |
| pull_request: | |
| concurrency: | |
| group: start-pull-request-build-${{ github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| DOWNLOAD_FOLDER: '.build-scripts/' | |
| SCRIPT_LOCATION: 'workflows/start-pull-request-build/pull-request-build-v1.sh' | |
| jobs: | |
| aws-sdk-pr-build: | |
| if: github.event_name == 'merge_group' || github.event.pull_request.draft == false | |
| runs-on: ubuntu-latest | |
| permissions: | |
| id-token: write | |
| issues: write | |
| pull-requests: write | |
| contents: read | |
| steps: | |
| - name: Configure AWS Credentials | |
| uses: aws-actions/configure-aws-credentials@v4 | |
| with: | |
| role-to-assume: ${{secrets.PR_WORKFLOW_IAM_ROLE_ARN}} | |
| role-session-name: PullRequestBuildGitHubAction | |
| aws-region: us-west-2 | |
| role-duration-seconds: 10800 # 3 hrs | |
| - 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 | |
| chmod +x ./$DOWNLOAD_FOLDER/$SCRIPT_LOCATION | |
| - name: Build | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| HEAD_REF: ${{ github.event.pull_request.head.ref || github.ref_name }} | |
| PR_NUMBER: ${{ github.event.pull_request.number }} | |
| run: | | |
| if [ -z "$PR_NUMBER" ] && [[ "$HEAD_REF" =~ ^gh-readonly-queue/.+/pr-([0-9]+)- ]]; then | |
| PR_NUMBER="${BASH_REMATCH[1]}" | |
| fi | |
| ./$DOWNLOAD_FOLDER/$SCRIPT_LOCATION \ | |
| --repo "${{ github.repository }}" \ | |
| --branch "$HEAD_REF" \ | |
| --pr-number "$PR_NUMBER" \ | |
| --run-id "${{ github.run_id }}" | |
| timeout-minutes: 180 |