Setting up Backstop #15
Workflow file for this run
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
name: Delete closed PR multidevs | |
on: | |
pull_request: | |
types: [closed] | |
jobs: | |
configure_env: | |
name: Configure environment and Terminus | |
runs-on: ubuntu-latest | |
steps: | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: "8.2" | |
- name: Install Terminus | |
uses: pantheon-systems/terminus-github-actions@main | |
with: | |
pantheon-machine-token: ${{ secrets.TERMINUS_TOKEN }} | |
remove_pr_env: | |
runs-on: ubuntu-latest | |
needs: [ configure_env ] | |
if: github.event_name == 'pull_request' | |
steps: | |
- name: Install Terminus | |
uses: pantheon-systems/terminus-github-actions@v1 | |
with: | |
pantheon-machine-token: ${{ secrets.TERMINUS_TOKEN }} | |
- name: Determine target environment and maybe delete it | |
run: | | |
# Use the PR number as the environment name | |
prnum="pr-${{ github.event.pull_request.number }}" | |
terminus env:delete ${{ vars.SITE_NAME }}.$prnum --delete-branch --yes |