Skip to content

kustomize-everything/action-env-build-and-deploy

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Repository files navigation

action-env-build-and-diff

CodeScene general CodeScene Code Health

Build and diff a Kustomize Environment overlay with GitHub Actions. Another FOSS tool that enables a similar workflow is Bookkeeper from Akuity.

Usage

Pre-requisites

Inputs

Refer to action.yml

Outputs

Refer to action.yml

Example Workflow

For a complete example, please refer to kustomize-everything/guestbook-deploy.

---
name: Render Manifests
on:
  push:
    branches:
      - main
  pull_request:
    branches:
      - main

permissions:
  contents: write
  pull-requests: write

jobs:
  render-manifests:
    name: Render manifests
    runs-on: ubuntu-latest
    strategy:
      matrix:
        env: [dev, prod]

    steps:
      - uses: actions/checkout@v3
        with:
          # fetch-depth: 0 needed to get all branches
          fetch-depth: 0

      - name: Render manifests and comment with diff
        uses: kustomize-everything/[email protected]
        if: github.event_name == 'pull_request'
        with:
          dry-run: 'true'
          environment: ${{ matrix.env }}
          push-environment-regex: dev
          pr-environment-regex: prod

      - name: Render manifests and push branch
        uses: kustomize-everything/[email protected]
        if: github.event_name == 'push'
        with:
          dry-run: 'false'
          environment: ${{ matrix.env }}
          push-environment-regex: dev
          pr-environment-regex: prod

Contributing

We would love for you to contribute to kustomize-everything/actions-env-build-and-deploy, pull requests are welcome!

License

The scripts and documentation in this project are released under the MIT License.

About

Build and diff a Kustomize Environment with GitHub Actions

Resources

License

Stars

Watchers

Forks

Packages

No packages published