Skip to content

fix(deps): update module github.com/google/uuid to v1.6.0 - autoclosed #150

fix(deps): update module github.com/google/uuid to v1.6.0 - autoclosed

fix(deps): update module github.com/google/uuid to v1.6.0 - autoclosed #150

name: Preview-Destroy
on:
pull_request:
types:
- closed
env:
ENVIRONMENT: test
OPENSHIFT_API: https://api.cloudscale-lpg-2.appuio.cloud:6443
HELM_RELEASE_NAME: odootools-pr-${{ github.event.number }}
IMG_TAG: pr-${{ github.event.number }}
NAMESPACE: vshn-odoo-test
jobs:
uninstall:
runs-on: ubuntu-latest
if: ${{ !startsWith(github.head_ref, 'renovate/') }}
steps:
- uses: actions/checkout@v4
- name: Setup helmfile
uses: mamezou-tech/[email protected]
with:
helm-version: v3.7.1
helmfile-version: v0.142.0
install-kubectl: false
- name: Install CLI tools from OpenShift Mirror
uses: redhat-actions/openshift-tools-installer@v1
with:
oc: "4"
- name: Authenticate and set context
uses: redhat-actions/oc-login@v1
with:
openshift_server_url: ${{ env.OPENSHIFT_API }}
openshift_token: ${{ secrets.OPENSHIFT_TOKEN }}
namespace: ${{ env.NAMESPACE }}
- name: Uninstall app
run: make preview.destroy
env:
HELM_RELEASE_NAME: ${{ env.HELM_RELEASE_NAME }}
- name: Delete image in registry
run: oc -n ${{ env.NAMESPACE }} delete imagestreamtags odootools:${{ env.IMG_TAG }} --ignore-not-found
- name: Notify on success
uses: peter-evans/create-or-update-comment@v3
with:
issue-number: ${{ github.event.number }}
body: |
## ✔️ Preview deployment uninstalled
| | |
|-|-|
**Helm release** | ${{ env.NAMESPACE }}/${{ env.HELM_RELEASE_NAME }}
**Cluster** | ${{ env.OPENSHIFT_API }}
- name: Notify on failure
uses: peter-evans/create-or-update-comment@v3
if: ${{ failure() }}
with:
issue-number: ${{ github.event.number }}
body: |
## ❌ Failed to remove preview deployment
| | |
|-|-|
**App URL** | https://${{ env.ROUTE_HOST }}
**Helm release** | ${{ env.NAMESPACE }}/${{ env.HELM_RELEASE_NAME }}
**Cluster** | ${{ env.OPENSHIFT_API }}
Please investigate what went wrong in the GitHub actions logs.
Maintainers can manually remove the deployment by running
```bash
make preview.destroy -e HELM_RELEASE_NAME=${{ env.HELM_RELEASE_NAME }}
oc -n ${{ env.NAMESPACE }} delete imagestreamtags odootools:${{ env.IMG_TAG }} --ignore-not-found
```