Build and diff a Kustomize Environment overlay with GitHub Actions. Another FOSS tool that enables a similar workflow is Bookkeeper from Akuity.
- Github repo where your Kustomize deployment files reside e.g. kustomize-everything/guestbook-deploy
Refer to action.yml
Refer to action.yml
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
We would love for you to contribute to kustomize-everything/actions-env-build-and-deploy, pull requests are welcome!
The scripts and documentation in this project are released under the MIT License.