add runner #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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, stage, 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|stage) | |
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|stage) | |
pr-environment-regex: prod |