Skip to content

chore: bump @mui/icons-material from 5.16.7 to 5.16.12 in /app #561

chore: bump @mui/icons-material from 5.16.7 to 5.16.12 in /app

chore: bump @mui/icons-material from 5.16.7 to 5.16.12 in /app #561

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: Install OpenShift CLI (oc)
uses: redhat-actions/openshift-tools-installer@v1
with:
oc: latest
- 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 $FEATURE_NAME | tr '[:upper:]' '[:lower:]' | sed 's/-*$//')
FEATURE_NAME_LOWER_SHORT=$(echo $FEATURE_NAME_LOWER | cut -c -30 | sed 's/-*$//')
NAMESPACE="${{ secrets.OPENSHIFT_APP_NAMESPACE }}"
# Check if the release exists
if helm list -n "$NAMESPACE" | grep -q "^$FEATURE_NAME_LOWER_SHORT\s"; then
# Release exists, uninstall it
helm uninstall "$FEATURE_NAME_LOWER_SHORT" -n "$NAMESPACE"
else
echo "Helm release $FEATURE_NAME_LOWER_SHORT not found, nothing to do"
fi