mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
github-action: undeploy serverless for closed PRs using ci:project-deploy-observability
(#182374)
Automate the undeployment for all those Kibana PRs using the label `ci:project-deploy-observability` once those PRs have been closed (merged, closed). This will help with tidying up all the ongoing deployments that were created automatically as part of the recent automation with https://github.com/elastic/kibana/pull/181851
This commit is contained in:
parent
a4140cfd5d
commit
63e29efbc6
2 changed files with 33 additions and 0 deletions
1
.github/CODEOWNERS
vendored
1
.github/CODEOWNERS
vendored
|
@ -1030,6 +1030,7 @@ packages/kbn-monaco/src/esql @elastic/kibana-esql
|
|||
|
||||
# Observability robots
|
||||
/.github/workflows/deploy-my-kibana.yml @elastic/observablt-robots
|
||||
/.github/workflows/undeploy-my-kibana.yml @elastic/observablt-robots
|
||||
/.github/workflows/oblt-github-commands @elastic/observablt-robots
|
||||
|
||||
# Infra Monitoring
|
||||
|
|
32
.github/workflows/undeploy-my-kibana.yml
vendored
Normal file
32
.github/workflows/undeploy-my-kibana.yml
vendored
Normal file
|
@ -0,0 +1,32 @@
|
|||
---
|
||||
##
|
||||
## This the automation will undeploy an existing automated deployment
|
||||
## caused by a merged/closed event and if the GitHub label matches
|
||||
## the automated one.
|
||||
##
|
||||
## Owner: @elastic/observablt-robots
|
||||
## Further details: https://ela.st/oblt-deploy-my-kibana
|
||||
##
|
||||
name: undeploy-my-kibana
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
types: [closed]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
undeploy-my-kibana:
|
||||
if: contains(github.event.pull_request.labels.*.name, 'ci:project-deploy-observability')
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: elastic/apm-pipeline-library/.github/actions/github-token@current
|
||||
with:
|
||||
url: ${{ secrets.OBLT_VAULT_ADDR }}
|
||||
roleId: ${{ secrets.OBLT_VAULT_ROLE_ID }}
|
||||
secretId: ${{ secrets.OBLT_VAULT_SECRET_ID }}
|
||||
|
||||
- uses: elastic/apm-pipeline-library/.github/actions/undeploy-my-kibana@current
|
||||
with:
|
||||
token: ${{ env.GITHUB_TOKEN }}
|
Loading…
Add table
Add a link
Reference in a new issue