Skip to content

fix(container): update image ghcr.io/onedr0p/plex-beta to v1.40.0.7996-4956e330f - autoclosed #361

fix(container): update image ghcr.io/onedr0p/plex-beta to v1.40.0.7996-4956e330f - autoclosed

fix(container): update image ghcr.io/onedr0p/plex-beta to v1.40.0.7996-4956e330f - autoclosed #361

Workflow file for this run

---
name: "Flux Helm Repository Sync"
on:
workflow_dispatch:
inputs:
clusterName:
description: Cluster Name
default: main
required: true
helmRepoNamespace:
description: Helm Repository Namespace
default: flux-system
required: true
helmRepoName:
description: Helm Repository Name
required: true
pull_request:
branches: ["main"]
paths: ["kubernetes/**/helmrelease.yaml"]
env:
DEBCONF_NONINTERACTIVE_SEEN: "true"
DEBIAN_FRONTEND: noninteractive
APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE: DontWarn
jobs:
sync:
name: Flux Helm Repository Sync
runs-on: ["arc-runner-set-home-ops"]
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
fetch-depth: 0
- name: Setup Tools
shell: bash
run: sudo apt-get -qq update && sudo apt-get -qq install --no-install-recommends -y curl git
- name: Setup Kube Tools
uses: yokawasa/action-setup-kube-tools@af4ebb1af1efd30c5bd84a2e9773355ad6362a33 # v0.9.3
with:
setup-tools: yq
- name: Setup Flux
uses: fluxcd/flux2/action@5c5c15ea212b8f029a110f9975851d25c8272695 # v2.2.2
- name: Write kubeconfig
id: kubeconfig
uses: timheuer/base64-to-file@784a1a4a994315802b7d8e2084e116e783d157be # v1.2.4
with:
encodedString: "${{ secrets.KUBECONFIG }}"
fileName: kubeconfig
- if: ${{ github.event.inputs.clusterName == '' && github.event.inputs.helmRepoNamespace == '' && github.event.inputs.helmRepoName == '' }}
name: Get changed files
id: changed-files
uses: tj-actions/changed-files@90a06d6ba9543371ab4df8eeca0be07ca6054959 # v42.0.2
with:
files: kubernetes/**/helmrelease.yaml
- if: ${{ github.event.inputs.clusterName == '' && github.event.inputs.helmRepoNamespace == '' && github.event.inputs.helmRepoName == '' }}
name: Sync Helm Repository
env:
KUBECONFIG: "${{ steps.kubeconfig.outputs.filePath }}"
shell: bash
run: |
declare -a repos=()
for f in ${{ steps.changed-files.outputs.all_changed_and_modified_files }}; do
cluster_name=$(echo "${f}" | awk -F'/' '{print $2}')
repo_namespace="$(yq '.spec.chart.spec.sourceRef.namespace' "${f}")"
repo_name="$(yq '.spec.chart.spec.sourceRef.name' "${f}")"
repos+=("${cluster_name}:${repo_namespace}:${repo_name}")
done
mapfile -t repos < <(printf "%s\n" "${repos[@]}" | sort -u)
for r in "${repos[@]}"; do
IFS=':' read -r cluster_name repo_namespace repo_name <<< "${r}"
flux \
--context "${cluster_name}" \
--namespace "${repo_namespace}" \
reconcile source helm "${repo_name}"
done
- if: ${{ github.event.inputs.clusterName != '' && github.event.inputs.helmRepoNamespace != '' && github.event.inputs.helmRepoName != '' }}
name: Sync Helm Repository
env:
KUBECONFIG: ${{ steps.kubeconfig.outputs.filePath }}
shell: bash
run: |
flux \
--context ${{ github.event.inputs.clusterName }} \
--namespace ${{ github.event.inputs.helmRepoNamespace }} \
reconcile source helm ${{ github.event.inputs.helmRepoName }}