Skip to content

Update Flux

Update Flux #4

Workflow file for this run

name: Update Flux
on:
workflow_dispatch:
schedule:
- cron: "0 0 * * 1" # At 00:00 on Monday.
jobs:
components:
runs-on: ubuntu-latest
strategy:
matrix:
overlay:
- local
steps:
- name: Check out code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Flux CLI
uses: fluxcd/flux2/action@main
- name: Checkout branch
env:
BRANCH: update-flux-${{ matrix.overlay }}
run: |
(git checkout $BRANCH && git pull) || git checkout -b $BRANCH
- name: Check for updates
id: update
run: |
flux install --export > ./clusters/overlays/${{ matrix.overlay }}/flux-system/gotk-components.yaml
echo "flux_version=$(flux -v)" >> $GITHUB_OUTPUT
- name: Commit
continue-on-error: true
run: |
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git config --global user.name "github-actions[bot]"
git add .
git commit -am "${{ steps.update.outputs.flux_version }}"
git push -u origin HEAD
- name: GitHub Pull Request
env:
GH_TOKEN: ${{ github.token }}
run: |
gh pr create --fill-first --label CD || gh pr status