Skip to content

Commit

Permalink
fix commenter2
Browse files Browse the repository at this point in the history
  • Loading branch information
FreekingDean committed Oct 3, 2023
1 parent ee7f6ef commit 08e939a
Show file tree
Hide file tree
Showing 2 changed files with 111 additions and 0 deletions.
74 changes: 74 additions & 0 deletions .github/workflows/pr-commenter-apps.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
---
name: "Flux Diff [apps]"

on:
pull_request:
branches: ["main"]
paths: ["kubernetes/apps/**.yaml"]

jobs:
flux-diff:
name: Flux Diff
runs-on: ubuntu-latest
permissions:
pull-requests: write
strategy:
fail-fast: false
matrix:
path: ["kubernetes/apps"]
resource: ["helmrelease", "kustomization"]
steps:
- name: Diff Resources
uses: allenporter/flux-local/action/diff@efbe055c6dc2a63d1102db582632d2aa03696664 # 3.1.1
id: diff
with:
sources: home-kubernetes
path: "${{ matrix.path }}"
resource: "${{ matrix.resource }}"

- name: Create comment
uses: peter-evans/create-or-update-comment@c6c9a1a66007646a28c153e2a8580a5bad27bcfa # v3
if: ${{ steps.diff.outputs.diff != '' }}
with:
issue-number: ${{ github.event.number }}
body: |
```diff
${{ steps.diff.outputs.diff}}
```
---
name: "Flux Diff [flux/bootstrap]"

on:
pull_request:
branches: ["main"]
paths: ["kubernetes/flux/**.yaml", "kubernetes/bootstrap/**.yaml"]

jobs:
flux-diff:
name: Flux Diff
runs-on: ubuntu-latest
permissions:
pull-requests: write
strategy:
fail-fast: false
matrix:
path: ["kubernetes/bootstrap", "kubernetes/flux"]
resource: ["helmrelease", "kustomization"]
steps:
- name: Diff Resources
uses: allenporter/flux-local/action/diff@efbe055c6dc2a63d1102db582632d2aa03696664 # 3.1.1
id: diff
with:
sources: home-kubernetes
path: "${{ matrix.path }}"
resource: "${{ matrix.resource }}"

- name: Create comment
uses: peter-evans/create-or-update-comment@c6c9a1a66007646a28c153e2a8580a5bad27bcfa # v3
if: ${{ steps.diff.outputs.diff != '' }}
with:
issue-number: ${{ github.event.number }}
body: |
```diff
${{ steps.diff.outputs.diff}}
```
37 changes: 37 additions & 0 deletions .github/workflows/pr-commenter-flux.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---
name: "Flux Diff [flux/bootstrap]"

on:
pull_request:
branches: ["main"]
paths: ["kubernetes/flux/**.yaml", "kubernetes/bootstrap/**.yaml"]

jobs:
flux-diff:
name: Flux Diff
runs-on: ubuntu-latest
permissions:
pull-requests: write
strategy:
fail-fast: false
matrix:
path: ["kubernetes/bootstrap", "kubernetes/flux"]
resource: ["helmrelease", "kustomization"]
steps:
- name: Diff Resources
uses: allenporter/flux-local/action/diff@efbe055c6dc2a63d1102db582632d2aa03696664 # 3.1.1
id: diff
with:
sources: home-kubernetes
path: "${{ matrix.path }}"
resource: "${{ matrix.resource }}"

- name: Create comment
uses: peter-evans/create-or-update-comment@c6c9a1a66007646a28c153e2a8580a5bad27bcfa # v3
if: ${{ steps.diff.outputs.diff != '' }}
with:
issue-number: ${{ github.event.number }}
body: |
```diff
${{ steps.diff.outputs.diff}}
```

0 comments on commit 08e939a

Please sign in to comment.