1
- # ArgoCD Diff Github Action
1
+ # ArgoCD Diff GitHub Action
2
+
2
3
This action generates a diff between the current PR and the current state of the cluster.
3
4
4
- Note that this includes any changes between your branch and latest master, as well as ways in which the cluster is out of sync.
5
+ Note that this includes any changes between your branch and latest ` master ` , as well as ways in which the cluster is out of sync.
5
6
6
- # How to use it
7
+ ## Usage
7
8
8
9
Example GH action:
9
- ```
10
+ ``` yaml
10
11
name : ArgoCD Diff
11
12
12
13
on :
13
14
pull_request :
14
- branches: [ master ]
15
+ branches : [master, main ]
15
16
16
17
jobs :
17
18
argocd-diff :
@@ -32,15 +33,16 @@ jobs:
32
33
argocd-extra-cli-args : --grpc-web
33
34
` ` `
34
35
35
- # How it works
36
- 1 ) Downloads the specified version of the ArgoCD binary, and makes it executable
37
- 2 ) Connects to the ArgoCD api using the argocd token, and gets all the apps
38
- 3 ) Filters the apps to the ones that live in the current repo
39
- 3 ) Runs ` argocd app diff ` for each app
40
- 5 ) Posts the diff output as a comment on the PR
36
+ ## How it works
37
+
38
+ 1. Downloads the specified version of the ArgoCD binary, and makes it executable
39
+ 2. Connects to the ArgoCD API using the ` argocd-token`, and gets all the apps
40
+ 3. Filters the apps to the ones that live in the current repo
41
+ 4. Runs `argocd app diff` for each app
42
+ 5. Posts the diff output as a comment on the PR
43
+
44
+ # # Publishing
41
45
42
- # Publishing
43
46
Build the script and commit to your branch :
44
47
` npm run build && npm run pack`
45
- Commit the build output, and make a PR
46
-
48
+ Commit the build output, and make a PR.
0 commit comments