fix(container): update vector group #3912
Workflow file for this run
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
--- | |
name: "HelmRelease Diff" | |
on: | |
pull_request: | |
branches: ["master"] | |
paths: ["**.yaml"] | |
env: | |
KUBERNETES_DIR: ./ | |
jobs: | |
changed-files: | |
name: Detect File Changes | |
runs-on: ubuntu-latest | |
outputs: | |
matrix: ${{ steps.set-matrix.outputs.matrix }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Get changed files | |
id: changed-files | |
uses: tj-actions/changed-files@v45 | |
with: | |
json: true | |
files: | | |
**/*.yaml | |
files_ignore: | | |
.github/** | |
flux-system/** | |
Taskfile.yml | |
- id: set-matrix | |
run: echo "matrix={\"file\":${{ steps.changed-files.outputs.all_changed_files }}}" >> "${GITHUB_OUTPUT}" | |
diff: | |
name: Diff on Helm Releases | |
runs-on: ubuntu-latest | |
needs: [changed-files] | |
strategy: | |
matrix: ${{ fromJSON(needs.changed-files.outputs.matrix) }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Checkout default branch | |
uses: actions/checkout@v4 | |
with: | |
ref: "${{ github.event.repository.default_branch }}" | |
path: default_branch | |
- name: Setup Homebrew | |
uses: Homebrew/actions/setup-homebrew@master | |
- name: Setup Tools | |
run: | | |
brew install helm homeport/tap/dyff kustomize yq | |
- name: Diff | |
id: diff | |
run: | | |
# pin to 8.1.3 due to https://github.com/google/zx/issues/870 | |
npm install zx@8.1.3 | |
diff=$(npx zx@8.1.3 ./.github/scripts/helmReleaseDiff.mjs \ | |
--current-release "default_branch/${{ matrix.file }}" \ | |
--incoming-release "${{ matrix.file }}" \ | |
--kubernetes-dir ${{ env.KUBERNETES_DIR }} \ | |
--diff-tool "diff") | |
echo "diff<<EOF" >> "${GITHUB_OUTPUT}" | |
echo "${diff}" >> "${GITHUB_OUTPUT}" | |
echo "EOF" >> "${GITHUB_OUTPUT}" | |
- name: Find Comment | |
if: ${{ always() && steps.diff.outputs.diff != '' }} | |
uses: peter-evans/find-comment@v3 | |
id: find-comment | |
with: | |
issue-number: ${{ github.event.pull_request.number }} | |
body-includes: "Helm Release Diff: ${{ matrix.file }}" | |
- name: Create or update comment | |
if: ${{ always() && steps.diff.outputs.diff != '' }} | |
uses: peter-evans/create-or-update-comment@v4 | |
with: | |
comment-id: ${{ steps.find-comment.outputs.comment-id }} | |
issue-number: ${{ github.event.pull_request.number }} | |
body: | | |
Helm Release Diff: `${{ matrix.file }}` | |
```diff | |
${{ steps.diff.outputs.diff }} | |
``` | |
edit-mode: replace |