1
0
mirror of https://github.com/dokku/buildpack-nginx.git synced 2025-10-07 11:14:34 +00:00

refactor: split out workflows so that review app cleanup is properly run

The old setup - copy-pasted from the internet somewhere - was incorrect based on how github actions works. *sigh*
This commit is contained in:
Jose Diaz-Gonzalez
2022-09-10 18:19:27 -04:00
parent dce20c0a8f
commit 28328e4d90
2 changed files with 23 additions and 15 deletions

28
.github/workflows/review-app.yml vendored Normal file
View File

@ -0,0 +1,28 @@
---
name: 'deploy'
# yamllint disable-line rule:truthy
on:
# onl run this workflow on pull request events
pull_request
jobs:
review_app:
runs-on: ubuntu-latest
steps:
- name: Cloning repo
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Push to dokku
uses: dokku/github-action@master
with:
# create a review app
command: review-apps:create
git_remote_url: 'ssh://dokku@dokku.com/nginx-buildpack'
# specify `--force` as a flag for git pushes
git_push_flags: '--force'
# specify a name for the review app
review_app_name: nginx-buildpack-${{ github.event.pull_request.number }}
ssh_private_key: ${{ secrets.SSH_PRIVATE_KEY }}