chore: bump gradle from 8.10.0-jdk17 to 8.10.2-jdk17 in /backend #73
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: CD Test Cleanup | |
on: | |
# use target so secrets are not exposed | |
pull_request_target: | |
types: [ closed ] | |
branches: [ dependencies ] | |
env: | |
NAMESPACE: pr-${{ github.event.pull_request.number }} | |
jobs: | |
Undeploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Retrieve Source Code | |
uses: actions/checkout@v4 | |
- name: Install Kubectl | |
uses: Azure/setup-kubectl@v4 | |
- name: Configure Kubectl | |
env: | |
K8S_CONFIG: ${{ secrets.K8S_CONFIG }} | |
run: | | |
mkdir -p $HOME/.kube | |
echo "${K8S_CONFIG}" | base64 --decode > $HOME/.kube/config | |
shell: bash | |
- name: Delete Namespace | |
run: | | |
kubectl delete namespace $NAMESPACE --ignore-not-found | |
shell: bash | |
- name: Set all deployments to inactive | |
uses: actions/github-script@v7 | |
with: | |
github-token: ${{ secrets.GH_PAT }} | |
script: | | |
const { NAMESPACE } = process.env | |
// set all deployments to inactive | |
const deployments = await github.rest.repos.listDeployments({ | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
environment: `test/${NAMESPACE}`, | |
per_page: 100, | |
}) | |
for (const deployment of deployments.data) { | |
await github.rest.repos.createDeploymentStatus({ | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
deployment_id: deployment.id, | |
state: 'inactive', | |
environment: `test/${NAMESPACE}`, | |
}) | |
} | |
// delete environment | |
/* currently not supported | |
await github.rest.repos.deleteEnvironment({ | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
environment_name: `test/${NAMESPACE}`, | |
}) */ |