Coder Social home page Coder Social logo

trendingtechnology / actions-plan-preview Goto Github PK

View Code? Open in Web Editor NEW

This project forked from pipe-cd/actions-plan-preview

0.0 1.0 0.0 653 KB

An action that comments PipeCD's PlanPreview result on GitHub pull request.

License: Apache License 2.0

Dockerfile 100.00%

actions-plan-preview's Introduction

actions-plan-preview

An action that comments PipeCD's PlanPreview result on GitHub pull request. This action can be used for all application kinds: Kubernetes, Terraform, CloudRun, Lambda, Amazon ECS.

See https://pipecd.dev/docs/user-guide/plan-preview/ for more details about this feature.

Screenshots

  • Plan-preview comment shows the diff of an Kubernetes application

  • Plan-preview comment shows the diff of an Terraform application

Usage

By adding the following workflow to your .github directory (eg: .github/workflows/plan-preview.yaml) you will have:

  • The result of plan-preview will be automatically commented on pull request when it is opened or updated
  • You can leave a /pipecd plan-preview comment on pull request to trigger a plan-preview manually
on:
  pull_request:
    branches:
      - main
    types: [opened, synchronize, reopened]
  issue_comment:
    types: [created]

jobs:
  plan-preview:
    runs-on: ubuntu-latest
    if: "github.event_name == 'pull_request'"
    steps:
      - uses: pipe-cd/[email protected]
        with:
          address: ${{ secrets.PIPECD_API_ADDRESS }}
          api-key: ${{ secrets.PIPECD_PLAN_PREVIEW_API_KEY }}
          token: ${{ secrets.GITHUB_TOKEN }}

  plan-preview-on-comment:
    runs-on: ubuntu-latest
    if: "github.event_name == 'issue_comment' && github.event.issue.pull_request && startsWith(github.event.comment.body, '/pipecd plan-preview')"
    steps:
      - uses: pipe-cd/[email protected]
        with:
          address: ${{ secrets.PIPECD_API_ADDRESS }}
          api-key: ${{ secrets.PIPECD_PLAN_PREVIEW_API_KEY }}
          token: ${{ secrets.GITHUB_TOKEN }}

Inputs

Name Description Required Default Value
address The API address of PipeCD's control-plane. yes
api-key The API key with READ_WRITE role used by pipectl while communicating with PipeCD's control-plane. yes
token The GITHUB_TOKEN secret. yes

Contributing

Source code for this action is placing at pipe-cd/pipe repository. Please send pull request to that repository to update.

actions-plan-preview's People

Contributors

nghialv avatar

Watchers

 avatar

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.