Skip to content

Commit

Permalink
init ocp test
Browse files Browse the repository at this point in the history
  • Loading branch information
leiicamundi committed May 14, 2024
1 parent af34269 commit cf9de61
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions .github/actions/rosa-create-cluster/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,11 +104,17 @@ runs:
run: |
python3 -m pip install awscli
- name: Ensure S3 bucket exists
- name: Check if S3 bucket exists
id: create-s3-bucket
shell: bash
run: |
aws s3api create-bucket --bucket ${{ inputs.s3-backend-bucket }} --region ${{ inputs.aws-region }} --create-bucket-configuration LocationConstraint=${{ inputs.aws-region }}
aws s3api put-bucket-policy --bucket ${{ inputs.s3-backend-bucket }} --policy file://bucket-policy.json
if aws s3api head-bucket --bucket ${{ inputs.s3-backend-bucket }} 2>/dev/null; then
echo "Bucket already exists"
else
echo "Bucket does not exist, creating..."
aws s3api create-bucket --bucket ${{ inputs.s3-backend-bucket }} --region ${{ inputs.aws-region }} --create-bucket-configuration LocationConstraint=${{ inputs.aws-region }}
aws s3api put-bucket-policy --bucket ${{ inputs.s3-backend-bucket }} --policy file://bucket-policy.json
fi
- name: Terraform Init
shell: bash
Expand Down

0 comments on commit cf9de61

Please sign in to comment.