Skip to content

feat(container): update image quay.io/minio/minio to release.2024-05-01t01-11-10z #984

feat(container): update image quay.io/minio/minio to release.2024-05-01t01-11-10z

feat(container): update image quay.io/minio/minio to release.2024-05-01t01-11-10z #984

Workflow file for this run

---
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
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"]
jobs:
sync:
name: Flux Helm Repository Sync
runs-on: ["arc-runner-set-home-ops"]
steps:
- name: Generate Token
uses: actions/create-github-app-token@7bfa3a4717ef143a604ee0a99d859b8886a96d00 # v1
id: app-token
with:
app-id: "${{ secrets.BOT_APP_ID }}"
private-key: "${{ secrets.BOT_APP_PRIVATE_KEY }}"
- name: Checkout
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4
with:
token: "${{ steps.app-token.outputs.token }}"
fetch-depth: 0
- name: Setup Homebrew
uses: Homebrew/actions/setup-homebrew@master
- name: Setup Workflow Tools
shell: bash
run: brew install fluxcd/tap/flux yq
- name: Write kubeconfig
id: kubeconfig
uses: timheuer/base64-to-file@adaa40c0c581f276132199d4cf60afa07ce60eac # v1
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@0874344d6ebbaa00a27da73276ae7162fadcaf69 # v44
with:
files: kubernetes/**/helmrelease.yaml
safe_output: false
- if: ${{ github.event.inputs.clusterName == '' && github.event.inputs.helmRepoNamespace == '' && github.event.inputs.helmRepoName == '' }}
name: List All Changed Files
run: echo "${{ steps.changed-files.outputs.all_changed_and_modified_files }}"
- 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="kubernetes-admin@kubernetes"
repo_namespace="$(yq -r '.spec.chart.spec.sourceRef.namespace' "${f}")"
repo_name="$(yq -r '.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 }}