2022-09-10 22:19:27 +00:00
|
|
|
---
|
2022-09-10 22:20:42 +00:00
|
|
|
name: 'review-app-cleanup'
|
2022-09-10 22:19:27 +00:00
|
|
|
|
|
|
|
# yamllint disable-line rule:truthy
|
|
|
|
on:
|
|
|
|
# onl run this workflow on pull request events
|
|
|
|
pull_request:
|
|
|
|
types:
|
|
|
|
- closed
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
destroy_review_app:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Destroy the review app
|
|
|
|
uses: dokku/github-action@master
|
|
|
|
with:
|
|
|
|
# destroy a review app
|
|
|
|
command: review-apps:destroy
|
|
|
|
git_remote_url: 'ssh://dokku@dokku.me:22/nginx-buildpack'
|
|
|
|
# specify a name for the review app
|
|
|
|
review_app_name: nginx-buildpack-${{ github.event.pull_request.number }}
|
|
|
|
ssh_private_key: ${{ secrets.SSH_PRIVATE_KEY }}
|