Skip to content

Commit

Permalink
add sandbox deletion (#5674)
Browse files Browse the repository at this point in the history
  • Loading branch information
ypoplavs authored Jul 19, 2024
1 parent ab73b19 commit b614f25
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/sandbox-deletion.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Remove sandbox environment

on:
pull_request:
types: [closed]

jobs:
delete:
if: startsWith(github.event.pull_request.head.ref, 'sandbox/')
runs-on: ubuntu-latest
steps:
- uses: actions/create-github-app-token@v1
id: app-token
with:
app-id: ${{ secrets.APP_ID }}
private-key: ${{ secrets.PRIVATE_KEY }}
owner: ${{ github.repository_owner }}

- name: Repository dispatch
uses: peter-evans/repository-dispatch@v2
with:
token: ${{ steps.app-token.outputs.token }}
repository: kubeshop/testkube-deployment
event-type: sandbox_env_delete
client-payload: '{"ref_name": "${{ github.event.pull_request.head.ref }}"}'

0 comments on commit b614f25

Please sign in to comment.