-
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.
- Loading branch information
Showing
10 changed files
with
95 additions
and
19 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
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,48 @@ | ||
on: | ||
pull_request: | ||
types: [opened, synchronize] | ||
paths: | ||
- "argocd/**" | ||
|
||
permissions: | ||
contents: read | ||
pull-requests: write | ||
|
||
name: Diff GitOps Environments | ||
|
||
jobs: | ||
diff-env-argo: | ||
# The type of runner that the job will run on | ||
runs-on: ubuntu-latest | ||
services: | ||
reposerver: | ||
image: registry.puzzle.ch/cicd/argocd-repo-server:latest | ||
ports: | ||
- "8081:8081" | ||
options: >- | ||
--health-cmd "nc -z localhost 8081" | ||
--health-interval 10s | ||
--health-timeout 5s | ||
--health-retries 5 | ||
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 argocd "./source/argocd" --repoServer="reposerver:8081" --output-dir=/tmp/source/ | ||
goff argocd "./target/argocd" --repoServer="reposerver:8081" --output-dir=/tmp/target/ | ||
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
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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