GitHub Action
Preevy Down
Preevy is a powerful CLI tool designed to simplify the process of creating ephemeral preview environments. Using Preevy, you can easily provision any Docker Compose application using any Kubernetes server or affordable VMs on AWS Lightsail, Google Cloud or Azure VM.
Visit The full documentation here: https://preevy.dev/
Use this action to delete a preview environment using the Preevy CLI whenever a PR is merged or closed. More information about running Preevy from CI over here.
Preevy's GitHub plugin will automatically update the comment generated by the "up" workflow to indicate the environment was deleted.
See the preevy-up action for more information and examples.
required: true
The profile url created by the CLI, as detailed in the docs.
required: false
Optional path to the docker-compose.yaml
file. If not provided, uses the working directory. If you have multiple docker compose files, you can add them as a comma seperated string like so 'docker-compose.yml,docker-compose.dev.yml'
required: false
Optional additional args to the preevy down
command, see the full reference here.
required: false
The preevy CLI version to use. Defaults to latest
.
Note Version v1.2.0
of this action supports Preevy CLI versions 0.0.58
and up. To use an older version of the CLI, use livecycle/[email protected]
.
required: false
Node package manager used for caching. Supported values: npm, yarn, pnpm, or ''. Details. Default: npm.
name: Teardown Preevy environment
on:
pull_request:
types:
- closed
permissions:
id-token: write
contents: read
# needed to update the PR comment with the environment URLs
pull-requests: write
jobs:
teardown:
runs-on: ubuntu-latest
steps:
- uses: aws-actions/configure-aws-credentials@v2
with:
role-to-assume: arn:aws:iam::12345678:role/my-role
aws-region: eu-west-1
- uses: actions/checkout@v3
- uses: livecycle/[email protected]
id: preevy
with:
# Create the profile using the `preevy init` command, see
# https://preevy.dev/ci/overview
profile-url: "s3://preevy-12345678-my-profile?region=eu-west-1"
docker-compose-yaml-paths: "./docker/docker-compose.yaml"