mirror of https://github.com/snachodog/mybuddy.git
Add review app environment
This commit is contained in:
parent
6c733f1574
commit
6f4308c91a
|
@ -7,6 +7,9 @@ on:
|
||||||
jobs:
|
jobs:
|
||||||
create-review-app:
|
create-review-app:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
environment:
|
||||||
|
name: pr-${{ github.event.pull_request.number }}
|
||||||
|
url: https://pr-${{ github.event.pull_request.number }}.dokku.baby-buddy.net
|
||||||
if: github.event_name == 'labeled' && github.event.label.name == 'to review'
|
if: github.event_name == 'labeled' && github.event.label.name == 'to review'
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
@ -21,6 +24,9 @@ jobs:
|
||||||
ssh_private_key: ${{ secrets.DOKKU_SSH_PRIVATE_KEY }}
|
ssh_private_key: ${{ secrets.DOKKU_SSH_PRIVATE_KEY }}
|
||||||
destroy-review-app:
|
destroy-review-app:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
environment:
|
||||||
|
name: pr-${{ github.event.pull_request.number }}
|
||||||
|
url: https://pr-${{ github.event.pull_request.number }}.dokku.baby-buddy.net
|
||||||
if: github.event_name == 'unlabeled' && github.event.label.name == 'to review'
|
if: github.event_name == 'unlabeled' && github.event.label.name == 'to review'
|
||||||
steps:
|
steps:
|
||||||
- name: Destroy review app
|
- name: Destroy review app
|
||||||
|
@ -30,3 +36,8 @@ jobs:
|
||||||
git_remote_url: ${{ env.DOKKU_GIT_REMOTE_URL }}/demo
|
git_remote_url: ${{ env.DOKKU_GIT_REMOTE_URL }}/demo
|
||||||
review_app_name: pr-${{ github.event.pull_request.number }}
|
review_app_name: pr-${{ github.event.pull_request.number }}
|
||||||
ssh_private_key: ${{ secrets.DOKKU_SSH_PRIVATE_KEY }}
|
ssh_private_key: ${{ secrets.DOKKU_SSH_PRIVATE_KEY }}
|
||||||
|
- name: Delete environment
|
||||||
|
uses: strumwolf/delete-deployment-environment@v2
|
||||||
|
with:
|
||||||
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
environment: pr-${{ github.event.pull_request.number }}
|
||||||
|
|
Loading…
Reference in New Issue