Skip to content

feat(helm)!: Update chart nextcloud to 6.0.3 #61787

feat(helm)!: Update chart nextcloud to 6.0.3

feat(helm)!: Update chart nextcloud to 6.0.3 #61787

---
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@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
with:
fetch-depth: 0
- name: Setup Kube Tools
uses: yokawasa/action-setup-kube-tools@5fe385031665158529decddddb51d6224422836e # v0.11.1
with:
setup-tools: |
yq
- name: Setup Flux
uses: fluxcd/flux2/action@896e0fa46d5107a05e953dd0a5261d78a145ec8c # v2.3.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 }}