Skip to content

Update Flux

Update Flux #28

Workflow file for this run

name: Update Flux
on:
workflow_dispatch:
schedule:
- cron: "0 * * * *"
permissions:
contents: write
pull-requests: write
jobs:
update-flux:
runs-on: ubuntu-latest
strategy:
matrix:
environment: [development, production]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Flux
uses: fluxcd/flux2/action@main
- name: Check for updates
id: update
run: |
flux install \
--export > ./k8s/clusters/${{ matrix.environment }}/flux-system/gotk-components.yaml
VERSION="$(flux -v)"
echo "flux_version=$VERSION" >> $GITHUB_OUTPUT
- name: Create Pull Request
uses: peter-evans/create-pull-request@v5
with:
token: ${{ secrets.GITHUB_TOKEN }}
branch: update-flux
commit-message: Update ${{ matrix.environment }} to ${{ steps.update.outputs.flux_version }}
title: Update ${{ matrix.environment }} to ${{ steps.update.outputs.flux_version }}
body: |
${{ steps.update.outputs.flux_version }}