Giter Club home page Giter Club logo

kustomize-github-action's Introduction

kustomize-github-action

Kustomize GitHub Actions allow you to execute Kustomize Build command within GitHub Actions.

The output of the actions can be viewed from the Actions tab in the main repository view. If the actions are executed on a pull request event, a comment may be posted on the pull request.

Kustomize GitHub Actions is a single GitHub Action that can be executed on different overlays directories depending on the content of the GitHub Actions YAML file.

Success Criteria

An exit code of 0 is considered a successful execution.

Usage

The most common usage is to run kustomize build on an overlays directory, where one overlays directory represents k8s configs for one environment. A comment will be posted to the pull request depending on the output of the Kustomize build command being executed. This workflow can be configured by adding the following content to the GitHub Actions workflow YAML file.

name: 'Kustomize GitHub Actions'
on:
  - pull_request
jobs:
  kustomize:
    name: 'Kustomize'
    runs-on: ubuntu-latest
    steps:
      - name: 'Checkout'
        uses: actions/checkout@master
      - name: 'Kustomize Build'
        uses: karancode/kustomize-github-action@master
        with:
          kustomize_version: '3.0.0'
          kustomize_build_dir: '.'
          kustomize_comment: true
          kustomize_output_file: "gitops/rendered.yaml"
          kustomize_build_options: "--load_restrictor none"
          enable_alpha_plugins: true
        env:
          GITHUB_ACCESS_TOKEN: ${{ secrets.GITHUB_ACCESS_TOKEN }}

This was a simplified example showing the basic features of these Kustomize GitHub Action. More examples, coming soon!

Inputs

Inputs configure Kustomize GitHub Actions to perform build action.

  • kustomize_version - (Required) The Kustomize version to use for kustomize build.
  • kustomize_build_dir - (Optional) The directory to run kustomize build on (assumes that the directory contains a kustomization yaml file). Defaults to ..
  • kustomize_comment - (Optional) Whether or not to comment on GitHub pull requests. Defaults to false.
  • kustomize_output_file - (Optional) Path to to file to write the kustomize build output t.
  • kustomize_build_options - (Optional) Provide build options to kustomize build.
  • enable_alpha_plugins - (Optional) Enable Kustomize plugins. Defaults to false.

Outputs

Outputs are used to pass information to subsequent GitHub Actions steps.

  • kustomize_build_output - The Kustomize build outputs.

Secrets

Secrets are similar to inputs except that they are encrypted and only used by GitHub Actions. It's a convenient way to keep sensitive data out of the GitHub Actions workflow YAML file.

  • GITHUB_ACCESS_TOKEN - (Optional) The GitHub API token used to post comments to pull requests. Not required if the kustomize_comment input is set to false.

kustomize-github-action's People

Contributors

dan-slinky-ckpd avatar galuhestya avatar ivanlarinatspark avatar karancode avatar marccampbell avatar phanama avatar tamask-trax avatar tanguyantoine avatar willthames avatar

Forkers

galuhestya

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.