-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add examples for gitlab and github, extend Readme
- Loading branch information
Showing
4 changed files
with
81 additions
and
12 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
on: | ||
pull_request: | ||
types: [opened, synchronize] | ||
paths: | ||
- "helm/**" | ||
|
||
permissions: | ||
contents: read | ||
pull-requests: write | ||
|
||
name: Diff GitOps Environments | ||
|
||
jobs: | ||
diff-env: | ||
# The type of runner that the job will run on | ||
runs-on: ubuntu-latest | ||
container: | ||
image: registry.puzzle.ch/cicd/goff:latest | ||
steps: | ||
- name: Checkout PR | ||
uses: actions/checkout@v3 | ||
with: | ||
path: source | ||
- name: Checkout Target of PR | ||
uses: actions/checkout@v3 | ||
with: | ||
path: target | ||
ref: ${{ github.event.pull_request.base.ref }} | ||
- run: | | ||
helm template mychart ./source/helm/mychart --output-dir /tmp/source/out | ||
helm template mychart ./target/helm/mychart --output-dir /tmp/target/out | ||
goff diff "/tmp/source" "/tmp/target" --output-dir . | ||
- name: comment PR | ||
uses: machine-learning-apps/pr-comment@master | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
path: diff.md |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
on: | ||
pull_request: | ||
types: [opened, synchronize] | ||
paths: | ||
- "kustomize/**" | ||
|
||
permissions: | ||
contents: read | ||
pull-requests: write | ||
|
||
name: Diff GitOps Environments | ||
|
||
jobs: | ||
diff-env: | ||
# The type of runner that the job will run on | ||
runs-on: ubuntu-latest | ||
container: | ||
image: registry.puzzle.ch/cicd/goff:latest | ||
steps: | ||
- name: Checkout PR | ||
uses: actions/checkout@v3 | ||
with: | ||
path: source | ||
- name: Checkout Target of PR | ||
uses: actions/checkout@v3 | ||
with: | ||
path: target | ||
ref: ${{ github.event.pull_request.base.ref }} | ||
- run: | | ||
goff kustomize build ./source/kustomize --output-dir /tmp/source/out | ||
goff kustomize build ./target/kustomize --output-dir /tmp/target/out | ||
goff diff "/tmp/source" "/tmp/target" --title=Preview --output-dir . | ||
- name: comment PR | ||
uses: machine-learning-apps/pr-comment@master | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
path: diff.md |