From 699625bc8fe8b5c5cdf2ef9fb17e55013c772f0c Mon Sep 17 00:00:00 2001 From: Igor Abdrakhimov Date: Wed, 21 Feb 2024 13:52:48 -0800 Subject: [PATCH] Use aws-actions/configure-aws-credentials@v2 (#472) --- .github/workflows/ci.yml | 34 +++++++++++++++++----------------- .github/workflows/release.yml | 2 +- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d7b971d0..dcc0f9c2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -40,7 +40,7 @@ jobs: id-token: write # This is required for requesting the JWT steps: - name: configure AWS credentials (containers) - uses: aws-actions/configure-aws-credentials@v1 + uses: aws-actions/configure-aws-credentials@v2 with: role-to-assume: ${{ env.CI_IOT_CONTAINERS }} aws-region: ${{ env.AWS_DEFAULT_REGION }} @@ -61,7 +61,7 @@ jobs: - raspbian-bullseye steps: - name: configure AWS credentials (containers) - uses: aws-actions/configure-aws-credentials@v1 + uses: aws-actions/configure-aws-credentials@v2 with: role-to-assume: ${{ env.CI_IOT_CONTAINERS }} aws-region: ${{ env.AWS_DEFAULT_REGION }} @@ -86,7 +86,7 @@ jobs: run: | python -m pip install boto3 - name: configure AWS credentials (PubSub) - uses: aws-actions/configure-aws-credentials@v1 + uses: aws-actions/configure-aws-credentials@v2 with: role-to-assume: ${{ env.CI_PUBSUB_ROLE }} aws-region: ${{ env.AWS_DEFAULT_REGION }} @@ -102,7 +102,7 @@ jobs: run: | python ./aws-iot-device-sdk-js-v2/utils/run_in_ci.py --file ./aws-iot-device-sdk-js-v2/.github/workflows/ci_run_windows_cert_connect_cfg.json - name: configure AWS credentials (Device Advisor) - uses: aws-actions/configure-aws-credentials@v1 + uses: aws-actions/configure-aws-credentials@v2 with: role-to-assume: ${{ env.CI_DEVICE_ADVISOR }} aws-region: ${{ env.AWS_DEFAULT_REGION }} @@ -125,7 +125,7 @@ jobs: run: | python3 -m pip install boto3 - name: configure AWS credentials (PubSub) - uses: aws-actions/configure-aws-credentials@v1 + uses: aws-actions/configure-aws-credentials@v2 with: role-to-assume: ${{ env.CI_PUBSUB_ROLE }} aws-region: ${{ env.AWS_DEFAULT_REGION }} @@ -146,7 +146,7 @@ jobs: openssl pkcs12 -export -in /tmp/certificate.pem -inkey /tmp/privatekey.pem -out /tmp/pkcs12-key.p12 -name PubSub_Thing_Alias -password pass:$pkcs12_password python3 ./aws-iot-device-sdk-js-v2/utils/run_in_ci.py --file ./aws-iot-device-sdk-js-v2/.github/workflows/ci_run_pkcs12_connect_cfg.json - name: configure AWS credentials (Device Advisor) - uses: aws-actions/configure-aws-credentials@v1 + uses: aws-actions/configure-aws-credentials@v2 with: role-to-assume: ${{ env.CI_DEVICE_ADVISOR }} aws-region: ${{ env.AWS_DEFAULT_REGION }} @@ -169,7 +169,7 @@ jobs: run: | python3 -m pip install boto3 - name: configure AWS credentials (PubSub) - uses: aws-actions/configure-aws-credentials@v1 + uses: aws-actions/configure-aws-credentials@v2 with: role-to-assume: ${{ env.CI_PUBSUB_ROLE }} aws-region: ${{ env.AWS_DEFAULT_REGION }} @@ -184,7 +184,7 @@ jobs: sudo Xvfb -ac :99 -screen 0 1280x1024x24 > /dev/null 2>&1 & python ./aws-iot-device-sdk-js-v2/utils/run_in_ci.py --file ./aws-iot-device-sdk-js-v2/.github/workflows/ci_run_pubsub_electron_cfg.json - name: configure AWS credentials (Device Advisor) - uses: aws-actions/configure-aws-credentials@v1 + uses: aws-actions/configure-aws-credentials@v2 with: role-to-assume: ${{ env.CI_DEVICE_ADVISOR }} aws-region: ${{ env.AWS_DEFAULT_REGION }} @@ -276,7 +276,7 @@ jobs: export PYTHONPATH=${{ github.workspace }}/aws-iot-device-sdk-js-v2/utils python3 ./test_cases/test_jobs_execution.py --config-file test_cases/mqtt5_jobs_cfg.json - name: configure AWS credentials (Connect and PubSub) - uses: aws-actions/configure-aws-credentials@v1 + uses: aws-actions/configure-aws-credentials@v2 with: role-to-assume: ${{ env.CI_PUBSUB_ROLE }} aws-region: ${{ env.AWS_DEFAULT_REGION }} @@ -306,7 +306,7 @@ jobs: echo "directories.tokendir = /tmp/tokens" > /tmp/softhsm2.conf python3 ./aws-iot-device-sdk-js-v2/utils/run_in_ci.py --file ./aws-iot-device-sdk-js-v2/.github/workflows/ci_run_pkcs11_connect_cfg.json - name: configure AWS credentials (Cognito) - uses: aws-actions/configure-aws-credentials@v1 + uses: aws-actions/configure-aws-credentials@v2 with: role-to-assume: ${{ env.CI_COGNITO_ROLE }} aws-region: ${{ env.AWS_DEFAULT_REGION }} @@ -314,7 +314,7 @@ jobs: run: | python3 ./aws-iot-device-sdk-js-v2/utils/run_in_ci.py --file ./aws-iot-device-sdk-js-v2/.github/workflows/ci_run_cognito_connect_cfg.json - name: configure AWS credentials (X509) - uses: aws-actions/configure-aws-credentials@v1 + uses: aws-actions/configure-aws-credentials@v2 with: role-to-assume: ${{ env.CI_X509_ROLE }} aws-region: ${{ env.AWS_DEFAULT_REGION }} @@ -322,7 +322,7 @@ jobs: run: | python3 ./aws-iot-device-sdk-js-v2/utils/run_in_ci.py --file ./aws-iot-device-sdk-js-v2/.github/workflows/ci_run_x509_connect_cfg.json - name: configure AWS credentials (Custom Authorizer) - uses: aws-actions/configure-aws-credentials@v1 + uses: aws-actions/configure-aws-credentials@v2 with: role-to-assume: ${{ env.CI_CUSTOM_AUTHORIZER_ROLE }} aws-region: ${{ env.AWS_DEFAULT_REGION }} @@ -330,7 +330,7 @@ jobs: run: | python3 ./aws-iot-device-sdk-js-v2/utils/run_in_ci.py --file ./aws-iot-device-sdk-js-v2/.github/workflows/ci_run_custom_authorizer_connect_cfg.json - name: configure AWS credentials (Shadow) - uses: aws-actions/configure-aws-credentials@v1 + uses: aws-actions/configure-aws-credentials@v2 with: role-to-assume: ${{ env.CI_SHADOW_ROLE }} aws-region: ${{ env.AWS_DEFAULT_REGION }} @@ -341,7 +341,7 @@ jobs: run: | python3 ./aws-iot-device-sdk-js-v2/utils/run_in_ci.py --file ./aws-iot-device-sdk-js-v2/.github/workflows/ci_run_shadow_mqtt5_cfg.json - name: configure AWS credentials (Jobs) - uses: aws-actions/configure-aws-credentials@v1 + uses: aws-actions/configure-aws-credentials@v2 with: role-to-assume: ${{ env.CI_JOBS_ROLE }} aws-region: ${{ env.AWS_DEFAULT_REGION }} @@ -352,7 +352,7 @@ jobs: run: | python3 ./aws-iot-device-sdk-js-v2/utils/run_in_ci.py --file ./aws-iot-device-sdk-js-v2/.github/workflows/ci_run_jobs_mqtt5_cfg.json - name: configure AWS credentials (Fleet provisioning) - uses: aws-actions/configure-aws-credentials@v1 + uses: aws-actions/configure-aws-credentials@v2 with: role-to-assume: ${{ env.CI_FLEET_PROVISIONING_ROLE }} aws-region: ${{ env.AWS_DEFAULT_REGION }} @@ -363,7 +363,7 @@ jobs: run: | python3 ./aws-iot-device-sdk-js-v2/utils/run_fleet_provisioning_sample.py --file ./aws-iot-device-sdk-js-v2/.github/workflows/ci_run_fleet_provisioning_mqtt5_cfg.json --thing-name-prefix "Fleet_Thing_" - name: configure AWS credentials (MQTT5 PubSub) - uses: aws-actions/configure-aws-credentials@v1 + uses: aws-actions/configure-aws-credentials@v2 with: role-to-assume: ${{ env.CI_MQTT5_ROLE }} aws-region: ${{ env.AWS_DEFAULT_REGION }} @@ -374,7 +374,7 @@ jobs: run: | python3 ./aws-iot-device-sdk-js-v2/utils/run_in_ci.py --file ./aws-iot-device-sdk-js-v2/.github/workflows/ci_run_mqtt5_shared_subscription_cfg.json - name: configure AWS credentials (Greengrass) - uses: aws-actions/configure-aws-credentials@v1 + uses: aws-actions/configure-aws-credentials@v2 with: role-to-assume: ${{ env.CI_GREENGRASS_ROLE }} aws-region: ${{ env.AWS_DEFAULT_REGION }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e13f4855..afe9d244 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -67,7 +67,7 @@ jobs: force: true - name: configure AWS credentials (Release) - uses: aws-actions/configure-aws-credentials@v1 + uses: aws-actions/configure-aws-credentials@v2 with: role-to-assume: arn:aws:iam::180635532705:role/CI_V2_RELEASE_S3_ROLE aws-region: us-east-1