feat(container): update ghcr.io/actions/actions-runner (2.331.0 → 2.3… #994
This file contains hidden or 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: "Helm Repository Sync" | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| helmRepoNamespace: | |
| description: Helm Repository Namespace | |
| default: flux-system | |
| required: true | |
| helmRepoName: | |
| description: Helm Repository Name | |
| required: true | |
| push: | |
| branches: ["main"] | |
| paths: ["kubernetes/**/helmrelease.yaml"] | |
| env: | |
| HOMEBREW_NO_ANALYTICS: "1" | |
| jobs: | |
| sync: | |
| name: Helm Repository Sync | |
| runs-on: ["home-infrastructure-runner"] | |
| if: github.event_name == 'workflow_dispatch' || github.event.head_commit.author.name == 'renovate[bot]' | |
| steps: | |
| - name: ⬇️ Checkout | |
| uses: actions/checkout@v6 | |
| - name: 🛠 Set up Flux CLI | |
| uses: fluxcd/flux2/action@main | |
| with: | |
| version: 2.4.0 | |
| - name: 🛠 Set up yq | |
| uses: jdx/mise-action@v3 | |
| with: | |
| tool_versions: | | |
| yq latest | |
| - if: ${{ github.event.inputs.helmRepoNamespace == '' && github.event.inputs.helmRepoName == '' }} | |
| name: 🔎 Get Changed Files | |
| id: changed-files | |
| uses: tj-actions/changed-files@v47 | |
| with: | |
| files: kubernetes/**/helmrelease.yaml | |
| safe_output: false | |
| - if: ${{ github.event.inputs.helmRepoNamespace == '' && github.event.inputs.helmRepoName == '' }} | |
| name: 🔄 Sync Helm Repository | |
| run: | | |
| declare -A repos=() | |
| for f in ${{ steps.changed-files.outputs.all_changed_and_modified_files }}; do | |
| repo_namespace="$(yq -r '.spec.chart.spec.sourceRef.namespace' "${f}")" | |
| repo_name="$(yq -r '.spec.chart.spec.sourceRef.name' "${f}")" | |
| repos["${repo_namespace}:${repo_name}"]=1 | |
| done | |
| for r in "${!repos[@]}"; do | |
| IFS=':' read -r repo_namespace repo_name <<< "${r}" | |
| flux --namespace ${repo_namespace} \ | |
| reconcile source helm ${repo_name} || true | |
| done | |
| - if: ${{ github.event.inputs.helmRepoNamespace != '' && github.event.inputs.helmRepoName != '' }} | |
| name: 🔄 Sync Helm Repository | |
| run: | | |
| flux --namespace ${{ github.event.inputs.helmRepoNamespace }} \ | |
| reconcile source helm ${{ github.event.inputs.helmRepoName }} || true |