From 6335b9e8d8390107cccb6ef6c67213224c46b44c Mon Sep 17 00:00:00 2001 From: Dean Galvin Date: Mon, 11 Dec 2023 22:04:48 -0500 Subject: [PATCH] Update pr commenter --- .github/workflows/pr-commenter-apps.yaml | 74 ------------------------ .github/workflows/pr-commenter-flux.yaml | 10 +++- 2 files changed, 7 insertions(+), 77 deletions(-) delete mode 100644 .github/workflows/pr-commenter-apps.yaml diff --git a/.github/workflows/pr-commenter-apps.yaml b/.github/workflows/pr-commenter-apps.yaml deleted file mode 100644 index 38dda2a87..000000000 --- a/.github/workflows/pr-commenter-apps.yaml +++ /dev/null @@ -1,74 +0,0 @@ ---- -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}} - ``` diff --git a/.github/workflows/pr-commenter-flux.yaml b/.github/workflows/pr-commenter-flux.yaml index e14ac83eb..b615da9da 100644 --- a/.github/workflows/pr-commenter-flux.yaml +++ b/.github/workflows/pr-commenter-flux.yaml @@ -4,7 +4,7 @@ name: "Flux Diff [flux/bootstrap]" on: pull_request: branches: ["main"] - paths: ["kubernetes/flux/**.yaml", "kubernetes/bootstrap/**.yaml"] + paths: ["kubernetes/**.yaml"] jobs: flux-diff: @@ -15,11 +15,15 @@ jobs: strategy: fail-fast: false matrix: - path: ["kubernetes/bootstrap", "kubernetes/flux"] + path: ["kubernetes/apps", "kubernetes/bootstrap", "kubernetes/flux"] resource: ["helmrelease", "kustomization"] steps: + - name: Setup Flux + uses: fluxcd/flux2/action@a18d4f345021182d6516bf3e8e00210567f46ab5 # v2.1.2 + - name: Diff Resources - uses: allenporter/flux-local/action/diff@efbe055c6dc2a63d1102db582632d2aa03696664 # 3.1.1 + # uses: allenporter/flux-local/action/diff@19bfc6920e8964a479363bc230e6c329120ead02 # 3.2.0 + uses: allenporter/flux-local/action/diff@flux-build id: diff with: sources: home-kubernetes