Flux / Update #2869
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
--- | |
# Copyright (C) Nicolas Lamirault <[email protected]> | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# | |
# Unless required by applicable law or agreed to in writing, software | |
# distributed under the License is distributed on an "AS IS" BASIS, | |
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
# See the License for the specific language governing permissions and | |
# limitations under the License. | |
# | |
# SPDX-License-Identifier: Apache-2.0 | |
name: Flux / Update | |
on: # yamllint disable-line rule:truthy | |
workflow_dispatch: | |
schedule: | |
- cron: "0 */12 * * *" | |
jobs: | |
flux: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Monitor Actions | |
uses: GitHubSecurityLab/actions-permissions/monitor@v1 | |
with: | |
config: ${{ vars.PERMISSIONS_CONFIG }} | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
with: | |
fetch-depth: 1 | |
- name: Setup Flux CLI | |
uses: fluxcd/flux2/action@main | |
- name: Update Flux components | |
id: update | |
run: | | |
UGLY_VERSION="$(flux -v)" | |
VERSION="v${UGLY_VERSION#*flux version }" | |
flux install --version="${VERSION}" \ | |
--network-policy=true \ | |
--export > ./gitops/fluxcd/clusters/aws/staging/flux-system/gotk-components.yaml | |
flux install --version="${VERSION}" \ | |
--network-policy=true \ | |
--export > ./gitops/fluxcd/clusters/azure/dev/flux-system/gotk-components.yaml | |
flux install --version="${VERSION}" \ | |
--network-policy=true \ | |
--export > ./gitops/fluxcd/clusters/gcp/dev/flux-system/gotk-components.yaml | |
flux install --version="${VERSION}" \ | |
--network-policy=true \ | |
--export > ./gitops/fluxcd/clusters/k3s/homelab/flux-system/gotk-components.yaml | |
echo "FLUX_VERSION=${VERSION}" >> $GITHUB_OUTPUT | |
- name: Create pull request for Flux update | |
uses: peter-evans/create-pull-request@v7 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
branch: "flux/update-aws-${{ steps.update.outputs.FLUX_VERSION }}" | |
delete-branch: true | |
title: "Update Flux components to ${{ steps.update.outputs.FLUX_VERSION }}" | |
signoff: true | |
committer: "Nicolas Lamirault <[email protected]>" | |
author: "Nicolas Lamirault <[email protected]>" | |
assignees: "nlamirault" | |
commit-message: "Update Flux components to ${{ steps.update.outputs.FLUX_VERSION }}" | |
body: | | |
Release notes: https://github.com/fluxcd/flux2/releases/tag/${{ steps.update.outputs.FLUX_VERSION }} | |
Signed-off-by: Nicolas Lamirault <[email protected]> | |
labels: kind/renovate, lifecycle/active, dependency/flux, cloud/aws, area/kubernetes, status/review_needed, needs/priority |