Giter VIP home page Giter VIP logo

preevy-down-action's Introduction

Deploy preview environment using preevy

About Preevy

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/

About the preevy-down action

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.

Permissions

Preevy requires the following GitHub Actions permissions:

  • contents: read: used by Preevy to read the Docker Compose file(s)
  • pull-requests: write: used by the Preevy GitHub plugin to write or update a comment on the PR

In addition, if you're using GitHub's OIDC Token endpoint to authenticate to your cloud provider (as in the below examples), id-token: write: is also needed.

Inputs

profile-url

required: true

The profile url created by the CLI, as detailed in the docs.

args

required: false

Optional additional args to the preevy down command. Full reference.

version

required: false

The preevy CLI version to use. Defaults to latest.

Note Since v1.3.0, this action requires Preevy CLI version v0.0.58 or newer. To use an older version of the CLI, use livecycle/[email protected].

docker-compose-yaml-paths

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'

install

required: false

EXPERIMENTAL. Installation method for the Preevy CLI. Specify gh-release to install Preevy from a binary file, which is much faster than using NPM. Specify none to skip the installation steps. The default is npm which will install from NPM.

If gh-release is specified, version can be either latest or one of the released versions. Canary versions are not supported.

node-cache

required: false

Node package manager used for caching. Supported values: npm, yarn, pnpm, or ''. Details. Default: npm.

working-directory

required: false

Specifies the working directory where the Preevy CLI is run

Example usage

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
          profile-url: "s3://preevy-12345678-my-profile?region=eu-west-1"
          docker-compose-yaml-paths: "./docker/docker-compose.yaml"

preevy-down-action's People

Contributors

assafkr avatar eliyabar avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

aleclerc-cio

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.