Skip to content

Update flux @home

Update flux @home #328

---
name: Update flux @home
on:
workflow_dispatch:
schedule:
- cron: "44 4 * * *"
jobs:
components:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Setup Flux CLI
uses: fluxcd/flux2/action@main
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Update Flux components
id: update
run: |
UGLY_VERSION="$(flux -v)"
VERSION="v${UGLY_VERSION#*flux version }"
flux install --version="${VERSION}" \
--export > ./cluster-home/operations/flux-system/gotk-components.yaml
echo "flux_version=${VERSION}" >> $GITHUB_OUTPUT
- name: Create pull request for Flux update
uses: peter-evans/create-pull-request@v5
with:
token: ${{ secrets.GITHUB_TOKEN }}
branch: "flux/update-${{ steps.update.outputs.flux_version }}"
delete-branch: true
title: "Update flux components to ${{ steps.update.outputs.flux_version }} @home"
signoff: true
committer: "${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>"
author: "${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>"
assignees: "tbouska"
commit-message: "Update flux components to ${{ steps.update.outputs.flux_version }} @home"
body: |
Release notes: https://github.com/fluxcd/flux2/releases/tag/${{ steps.update.outputs.flux_version }}
labels: flux/update