chore: refactor modal opening in project area page #47
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: clean-feature-env | |
on: | |
pull_request: | |
branches: [main] | |
types: [closed, converted_to_draft] | |
workflow_call: | |
secrets: | |
OPENSHIFT_TOKEN: { required: true } | |
OPENSHIFT_APP_NAMESPACE: { required: true } | |
OPENSHIFT_SERVER: { required: true } | |
env: | |
FEATURE_NAME: ${{ github.head_ref }} | |
jobs: | |
clean-feature-env: | |
runs-on: ubuntu-latest | |
environment: | |
name: development | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Authenticate with OpenShift | |
uses: redhat-actions/oc-login@v1 | |
with: | |
openshift_server_url: ${{ secrets.OPENSHIFT_SERVER }} | |
openshift_token: ${{ secrets.OPENSHIFT_TOKEN }} | |
- name: Clean feature environment db | |
run: | | |
chmod +x ./lib/feature_envs/delete_feature_db.sh | |
./lib/feature_envs/delete_feature_db.sh ccbc ${{ env.FEATURE_NAME }} ${{ secrets.OPENSHIFT_APP_NAMESPACE }} | |
- name: Uninstall feature Helm release | |
run: | | |
FEATURE_NAME_LOWER=$(echo "${{ env.FEATURE_NAME }}" | tr '[:upper:]' '[:lower:]') | |
NAMESPACE="${{ secrets.OPENSHIFT_APP_NAMESPACE }}" | |
# Check if the release exists | |
if helm list -n "$NAMESPACE" | grep -q "^$FEATURE_NAME_LOWER\s"; then | |
# Release exists, uninstall it | |
helm uninstall "$FEATURE_NAME_LOWER" -n "$NAMESPACE" | |
else | |
echo "Helm release $FEATURE_NAME_LOWER not found, nothing to do" | |
fi |