Skip to content

VEGA-2501 : Manual Status Change #minor #249

VEGA-2501 : Manual Status Change #minor

VEGA-2501 : Manual Status Change #minor #249

name: PR Closed Workflow
on:
pull_request:
types:
- closed
branches:
- main
defaults:
run:
shell: bash
jobs:
generate-environment-workspace-name:
runs-on: ubuntu-latest
steps:
- name: Generate workspace name
id: name_workspace
run: |
workspace=${{ github.event.number }}${{ github.head_ref }}
workspace=${workspace//-}
workspace=${workspace//_}
workspace=${workspace//\/}
workspace=${workspace:0:11}
workspace=$(echo ${workspace} | tr '[:upper:]' '[:lower:]')
echo "name=${workspace}" >> $GITHUB_OUTPUT
echo ${workspace}
outputs:
environment_workspace_name: ${{ steps.name_workspace.outputs.name }}
destroy-pr-env:
name: Destroy PR Environment
needs: [generate-environment-workspace-name]
uses: ./.github/workflows/env-destroy.yml
with:
workspace_name: ${{ needs.generate-environment-workspace-name.outputs.environment_workspace_name }}
secrets:
allowlist_deploy_key: ${{ secrets.SSH_PRIVATE_KEY_ALLOW_LIST_REPOSITORY }}
aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}