feat(helm): update rook-ceph group to v1.16.1 (minor) #64420
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: "HelmRepository Sync" | |
on: | |
workflow_dispatch: | |
inputs: | |
repoName: | |
description: "Flux HelmRepository Name" | |
required: true | |
repoNamespace: | |
description: "Flux HelmRepository Namespace" | |
default: "flux-system" | |
required: true | |
pull_request: | |
branches: ["main"] | |
paths: ["kubernetes/**/helmrelease.yaml"] | |
jobs: | |
sync: | |
name: Flux HelmRepository Sync | |
runs-on: ["self-hosted"] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
with: | |
fetch-depth: 0 | |
- name: Setup Kube Tools | |
uses: yokawasa/action-setup-kube-tools@9e25a4277af127b60011c95b6ed2da7e3b3613b1 # v0.11.2 | |
with: | |
setup-tools: | | |
yq | |
- name: Setup Flux | |
uses: fluxcd/flux2/action@5350425cdcd5fa015337e09fa502153c0275bd4b # v2.4.0 | |
- name: Write kubeconfig | |
id: kubeconfig | |
uses: timheuer/base64-to-file@adaa40c0c581f276132199d4cf60afa07ce60eac # v1.2 | |
with: | |
encodedString: ${{ secrets.KUBECONFIG }} | |
fileName: kubeconfig | |
- name: Get changed files | |
id: changed-files | |
uses: tj-actions/changed-files@c65cd883420fd2eb864698a825fc4162dd94482c # v44.5.7 | |
with: | |
files: | | |
kubernetes/**/helmrelease.yaml | |
- name: Sync HelmRepository | |
env: | |
KUBECONFIG: ${{ steps.kubeconfig.outputs.filePath }} | |
run: | | |
declare -a repos=() | |
for file in ${{ steps.changed-files.outputs.all_changed_and_modified_files }}; do | |
repoName="$(yq eval '.spec.chart.spec.sourceRef.name' "${file}")" | |
repoNamespace="$(yq eval '.spec.chart.spec.sourceRef.namespace' "${file}")" | |
repos+=("${repoName}:${repoNamespace}") | |
done | |
repos=($(for r in ${repos[@]}; do echo $r; done | sort -u)) | |
for repo in ${repos[@]}; do | |
flux --namespace "${repo##*:}" reconcile source helm "${repo%%:*}" | |
done | |
- name: Sync HelmRepository | |
if: ${{ github.event.inputs.repoName != '' }} | |
env: | |
KUBECONFIG: ${{ steps.kubeconfig.outputs.filePath }} | |
run: | | |
flux --namespace ${{ github.event.inputs.repoNamespace }} reconcile \ | |
source helm ${{ github.event.inputs.repoName }} |