chore(deps): update container image ghcr.io/home-assistant/home-assistant to v2023.9.2 #953
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
--- | |
# copyed from https://github.com/onedr0p/home-ops/blob/main/.github/workflows/helmrelease-diff.yaml | |
name: "HelmRelease Diff" | |
on: | |
pull_request: | |
branches: ["main"] | |
paths: ["kubernetes/**/helm-release.yaml"] | |
env: | |
KUBERNETES_DIR: kubernetes/flux | |
jobs: | |
changed-files: | |
name: Detect File Changes | |
runs-on: ubuntu-latest | |
outputs: | |
matrix: ${{ steps.set-matrix.outputs.matrix }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 | |
- name: Get changed files | |
id: changed-files | |
uses: tj-actions/changed-files@6ee9cdc5816333acda68e01cf12eedc619e28316 # v39.0.2 | |
with: | |
json: true | |
files: | | |
kubernetes/**/helm-release.yaml | |
- 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@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 | |
- name: Checkout default branch | |
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 | |
with: | |
ref: "${{ github.event.repository.default_branch }}" | |
path: default | |
- 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: | | |
diff=$(npx zx ./.github/scripts/helmReleaseDiff.mjs \ | |
--current-release "default/${{ matrix.file }}" \ | |
--incoming-release "${{ matrix.file }}" \ | |
--kubernetes-dir ${{ env.KUBERNETES_DIR }}) | |
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/[email protected] | |
id: find-comment | |
with: | |
issue-number: ${{ github.event.pull_request.number }} | |
# comment-author: ${{ env.BOT_USERNAME }} | |
body-includes: ${{ matrix.file }} | |
- name: Create or update comment | |
if: ${{ always() && steps.diff.outputs.diff != '' }} | |
uses: peter-evans/[email protected] | |
with: | |
comment-id: ${{ steps.find-comment.outputs.comment-id }} | |
issue-number: ${{ github.event.pull_request.number }} | |
body: | | |
Helm Release: `${{ matrix.file }}` | |
``` | |
${{ steps.diff.outputs.diff }} | |
``` | |
edit-mode: replace |