Schedule - Update Flux #2070
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
--- | |
name: Schedule - Update Flux | |
on: # yamllint disable-line rule:truthy | |
workflow_dispatch: | |
schedule: | |
- cron: "0 */12 * * *" | |
jobs: | |
upgrade-flux: | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Install Flux | |
uses: fluxcd/flux2/action@main | |
- name: Upgrade Flux | |
id: upgrade | |
run: | | |
UGLY_VERSION="$(flux -v)" | |
VERSION="v${UGLY_VERSION#*flux version }" | |
flux install --version="${VERSION}" \ | |
--components-extra=image-reflector-controller,image-automation-controller \ | |
--network-policy=false \ | |
--export > ./cluster/base/flux-system/gotk-components.yaml | |
echo "::set-output name=flux_version::$VERSION" | |
- name: Create pull request for Flux upgrade | |
uses: peter-evans/create-pull-request@v4 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
branch: "flux/upgrade-${{ steps.upgrade.outputs.flux_version }}" | |
delete-branch: true | |
title: "chore(deps): upgrade flux components to ${{ steps.upgrade.outputs.flux_version }}" | |
signoff: true | |
committer: "Danny Froberg <[email protected]>" | |
author: "Danny Froberg <[email protected]>" | |
assignees: "dfroberg" | |
commit-message: "chore(deps): upgrade flux components to ${{ steps.upgrade.outputs.flux_version }}" | |
body: | | |
Release notes: https://github.com/fluxcd/flux2/releases/tag/${{ steps.upgrade.outputs.flux_version }} | |
labels: flux/upgrade |