feat: Decide on Default Storage Class for EKS Clusters #150
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "🗑️ Docs Preview" | |
on: | |
workflow_dispatch: | |
pull_request_target: | |
types: | |
- closed | |
branches: | |
- 'main' | |
- 'master' | |
env: | |
AWS_REGION: us-east-2 | |
IAM_ROLE_ARN: arn:aws:iam::068007702576:role/cplive-plat-ue2-dev-cloudposse-docs-gha | |
IAM_ROLE_SESSION_NAME: cloudposse-docs-ci-destroy-pr-${{ github.event.pull_request.number }} | |
S3_BUCKET_NAME: cplive-plat-ue2-dev-cloudposse-docs-origin | |
PR_NUMBER: ${{ github.event.pull_request.number }} | |
# These permissions are needed to interact with the GitHub's OIDC Token endpoint | |
permissions: | |
id-token: write | |
contents: read | |
jobs: | |
destroy: | |
runs-on: ubuntu-latest | |
steps: | |
# https://github.com/marketplace/actions/configure-aws-credentials-action-for-github-actions | |
- name: Configure AWS Credentials | |
uses: aws-actions/configure-aws-credentials@v1 | |
with: | |
aws-region: ${{ env.AWS_REGION }} | |
role-to-assume: ${{ env.IAM_ROLE_ARN }} | |
role-session-name: ${{ env.IAM_ROLE_SESSION_NAME }} | |
- name: Delete S3 Bucket PR Folder | |
run: | | |
aws sts get-caller-identity | |
aws s3 rm s3://${{ env.S3_BUCKET_NAME }}/ --recursive --exclude "*" --include "pr-${{ env.PR_NUMBER }}/*" |