From 2f29ec1bf098f6c9e5a3ca35b0dcd67fe840a335 Mon Sep 17 00:00:00 2001 From: bryan-aguilar <46550959+bryan-aguilar@users.noreply.github.com> Date: Tue, 9 Jan 2024 14:03:20 -0800 Subject: [PATCH] Use input rather than secret (#702) --- .github/actions/cpUtility-testing/action.yml | 6 +++++- .github/workflows/main-build.yml | 1 + .github/workflows/nightly-upstream-snapshot-build.yml | 1 + 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/actions/cpUtility-testing/action.yml b/.github/actions/cpUtility-testing/action.yml index 16cadcfba4..e01f9d1f7a 100644 --- a/.github/actions/cpUtility-testing/action.yml +++ b/.github/actions/cpUtility-testing/action.yml @@ -16,6 +16,10 @@ inputs: adot-java-version: required: true description: "ADOT Java Version" + snapshot-ecr-role: + require: true + description: "IAM Role used for pushing to snapshot ecr" + runs: using: "composite" @@ -29,7 +33,7 @@ runs: - name: Configure AWS Credentials uses: aws-actions/configure-aws-credentials@v4 with: - role-to-assume: ${{ secrets.JAVA_INSTRUMENTATION_SNAPSHOT_ECR }} + role-to-assume: ${{ inputs.snapshot-ecr-role }} aws-region: ${{ inputs.aws-region }} - name: Login to private staging ecr diff --git a/.github/workflows/main-build.yml b/.github/workflows/main-build.yml index 04786fffe1..4869451c6c 100644 --- a/.github/workflows/main-build.yml +++ b/.github/workflows/main-build.yml @@ -126,6 +126,7 @@ jobs: image_uri_with_tag: ${{ steps.imageOutput.outputs.stagingImage }} image_registry: ${{ steps.imageOutput.outputs.stagingRegistry }} adot-java-version: ${{ steps.getADOTJavaVersion.outputs.adot_java_version }} + snapshot-ecr-role: ${{ secrets.JAVA_INSTRUMENTATION_SNAPSHOT_ECR }} - name: Upload to GitHub Actions uses: actions/upload-artifact@v3 diff --git a/.github/workflows/nightly-upstream-snapshot-build.yml b/.github/workflows/nightly-upstream-snapshot-build.yml index cfcde8a6ca..d73fb11056 100644 --- a/.github/workflows/nightly-upstream-snapshot-build.yml +++ b/.github/workflows/nightly-upstream-snapshot-build.yml @@ -78,6 +78,7 @@ jobs: image_uri_with_tag: ${{ steps.imageOutput.outputs.rcImage }} image_registry: ${{ steps.imageOutput.outputs.imageRegistry }} adot-java-version: ${{ steps.getADOTJavaVersion.outputs.adot_java_version }} + snapshot-ecr-role: ${{ secrets.JAVA_INSTRUMENTATION_SNAPSHOT_ECR }} - name: Upload to GitHub Actions uses: actions/upload-artifact@v3