From 62182ad6f69c5ff276815ca0566309011b23d753 Mon Sep 17 00:00:00 2001 From: leiicamundi <153937047+leiicamundi@users.noreply.github.com> Date: Tue, 14 May 2024 23:21:34 +0200 Subject: [PATCH] init ocp test --- .github/actions/rosa-create-cluster/action.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/actions/rosa-create-cluster/action.yml b/.github/actions/rosa-create-cluster/action.yml index 584636d..f9c7fc7 100644 --- a/.github/actions/rosa-create-cluster/action.yml +++ b/.github/actions/rosa-create-cluster/action.yml @@ -115,7 +115,12 @@ runs: aws s3api create-bucket --bucket ${{ inputs.s3-backend-bucket }} --region ${{ inputs.aws-region }} --create-bucket-configuration LocationConstraint=${{ inputs.aws-region }} fi - aws s3api put-bucket-policy --bucket ${{ inputs.s3-backend-bucket }} --region ${{ inputs.aws-region }} --policy file://.github/actions/rosa-create-cluster/bucket-policy.json + # Define the path to the bucket policy file + bucket_policy_path=".github/actions/rosa-create-cluster/bucket-policy.json" + + # Replace placeholders in the bucket policy file and apply the policy + sed -i "s|\${{ inputs.s3-backend-bucket }}|${{ inputs.s3-backend-bucket }}|g" "$bucket_policy_path" + aws s3api put-bucket-policy --bucket ${{ inputs.s3-backend-bucket }} --region ${{ inputs.aws-region }} --policy file://$bucket_policy_path - name: Terraform Init shell: bash