Skip to content

Commit 2d094d4

Browse files
authored
Merge pull request #7 from quizlet/karoun/fail-loud
Making Action fail when diff fails to post
2 parents 300f73f + 4f7d9f9 commit 2d094d4

File tree

6 files changed

+15152
-6704
lines changed

6 files changed

+15152
-6704
lines changed

.github/workflows/test.yml

+3-4
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,13 @@ jobs:
1010
build: # make sure build/ci work properly
1111
runs-on: ubuntu-latest
1212
steps:
13-
- uses: actions/checkout@v1
13+
- uses: actions/checkout@v2
1414
- run: |
1515
npm install
1616
npm run all
17+
1718
test: # make sure the action works on a clean machine without building
1819
runs-on: ubuntu-latest
1920
steps:
20-
- uses: actions/checkout@v1
21+
- uses: actions/checkout@v2
2122
- uses: ./
22-
with:
23-
milliseconds: 1000

README.md

+16-14
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,18 @@
1-
# ArgoCD Diff Github Action
1+
# ArgoCD Diff GitHub Action
2+
23
This action generates a diff between the current PR and the current state of the cluster.
34

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.
56

6-
# How to use it
7+
## Usage
78

89
Example GH action:
9-
```
10+
```yaml
1011
name: ArgoCD Diff
1112

1213
on:
1314
pull_request:
14-
branches: [ master ]
15+
branches: [master, main]
1516

1617
jobs:
1718
argocd-diff:
@@ -32,15 +33,16 @@ jobs:
3233
argocd-extra-cli-args: --grpc-web
3334
```
3435
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
4145

42-
# Publishing
4346
Build the script and commit to your branch:
4447
`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

Comments
 (0)