1
0
mirror of https://github.com/dokku/buildpack-nginx.git synced 2024-11-22 01:13:06 +00:00

Merge pull request #57 from dokku/review-app-cleanup

Split out workflows so that review app cleanup is properly run
This commit is contained in:
Jose Diaz-Gonzalez 2022-09-10 18:23:10 -04:00 committed by GitHub
commit 59ea0b94e1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 24 additions and 16 deletions

View File

@ -0,0 +1,23 @@
---
name: 'review-app-cleanup'
# 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 }}

View File

@ -1,5 +1,5 @@
---
name: 'deploy'
name: 'review-app'
# yamllint disable-line rule:truthy
on:
@ -26,18 +26,3 @@ jobs:
# specify a name for the review app
review_app_name: nginx-buildpack-${{ github.event.pull_request.number }}
ssh_private_key: ${{ secrets.SSH_PRIVATE_KEY }}
destroy_review_app:
runs-on: ubuntu-latest
# only run when a pull request is closed
if: github.event_name == 'pull_request' && github.event.action == 'closed'
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 }}