44 lines
1.4 KiB
YAML
44 lines
1.4 KiB
YAML
|
name: update-flux
|
||
|
|
||
|
on:
|
||
|
workflow_dispatch:
|
||
|
schedule:
|
||
|
- cron: "0 4 * * *"
|
||
|
|
||
|
|
||
|
jobs:
|
||
|
flux-upgrade:
|
||
|
runs-on: ubuntu-latest
|
||
|
steps:
|
||
|
- uses: actions/checkout@v2
|
||
|
with:
|
||
|
fetch-depth: 1
|
||
|
|
||
|
- name: Setup Flux CLI
|
||
|
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}" \
|
||
|
--network-policy=false \
|
||
|
--export > ./cluster/main/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@v3
|
||
|
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: "TrueCharts Bot <truecharts-bot@users.noreply.github.com>"
|
||
|
author: "TrueCharts Bot <truecharts-bot@users.noreply.github.com>"
|
||
|
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
|