Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .github/workflows/mobile_job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,10 +108,23 @@ jobs:
mkdir -p "${GITHUB_WORKSPACE}"
echo "::endgroup::"

- name: Calculate the role duration (seconds)
id: calculate-role-duration
env:
TIMEOUT_IN_MINUTES: ${{ inputs.timeout }}
shell: bash
run: |
set -ex

TIMEOUT_IN_SECONDS=$(( TIMEOUT_IN_MINUTES * 60 ))
echo "timeout-seconds=${TIMEOUT_IN_SECONDS}" >> "${GITHUB_OUTPUT}"

- name: Authenticate with AWS
uses: aws-actions/configure-aws-credentials@v3
with:
role-to-assume: arn:aws:iam::308535385114:role/gha_workflow_mobile_job
# This could go up to 18000, the max duration enforced by the server side
role-duration-seconds: ${{ steps.calculate-role-duration.outputs.timeout-seconds }}
aws-region: us-east-1

- name: Checkout repository (${{ inputs.test-infra-repository }}@${{ inputs.test-infra-ref }})
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/test_mobile_job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ jobs:
with:
device-type: android
runner: ubuntu-latest
timeout: 120
# There values are prepared beforehand for the test
project-arn: arn:aws:devicefarm:us-west-2:308535385114:project:02a2cf0f-6d9b-45ee-ba1a-a086587469e6
device-pool-arn: arn:aws:devicefarm:us-west-2:308535385114:devicepool:02a2cf0f-6d9b-45ee-ba1a-a086587469e6/e59f866a-30aa-4aa1-87b7-4510e5820dfa
Expand Down
Loading