diff --git a/action.yml b/action.yml index 053f6e8..5b68af7 100644 --- a/action.yml +++ b/action.yml @@ -27,6 +27,9 @@ inputs: tag_name_prefix: description: 'Tag name prefix to be used for checkout' default: '' + aws_role_arn: + description: 'The Amazon Resource Name (ARN) of the role to assume.' + default: 'arn:aws:iam::219341907983:role/github-action-default' outputs: version: description: 'The version of the artifact' @@ -41,13 +44,24 @@ runs: java-version: ${{ inputs.java_version }} server-id: github distribution: ${{ inputs.java_distribution }} + + - name: Configure AWS Credentials for s3 cache + uses: aws-actions/configure-aws-credentials@v5.0.0 + with: + aws-region: ap-south-1 + role-to-assume: ${{ inputs.aws_role_arn }} + - name: Cache local Maven repository - uses: actions/cache@v4 + uses: runs-on/cache@v4 + env: + AWS_REGION: ap-south-1 + RUNS_ON_S3_BUCKET_CACHE: "ct-github-action-cache" with: path: ~/.m2/repository key: ${{ runner.os }}-maven restore-keys: | ${{ runner.os }}-maven + - name: Set up Maven uses: stCarolas/setup-maven@v5 with: