Skip to content

Test GitHub triggering review app deployments #46

Test GitHub triggering review app deployments

Test GitHub triggering review app deployments #46

# Control Plane GitHub Action
name: Deploy Review App to Control Plane
# Controls when the workflow will run
on:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
issue_comment:
types: [created, edited]
# Convert the GitHub secret variables to environment variables for use by the Control Plane CLI
env:
CPLN_ORG: ${{secrets.CPLN_ORG_STAGING}}
CPLN_TOKEN: ${{secrets.CPLN_TOKEN_STAGING}}
jobs:
deploy-to-control-plane-staging:
if: ${{ github.event_name != 'issue_comment' || (github.event.comment.body == '/deploy-review-app' && github.event.issue.pull_request) }}
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v2
- uses: ./.github/actions/deploy-to-control-plane
with:
app_name: qa-react-webpack-rails-tutorial-pr-${{ github.event.pull_request.number }}
org: ${{ secrets.CPLN_ORG_STAGING }}