Test GitHub triggering review app deployments #46
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 }} |