Upgrade Flux #2494
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: Upgrade Flux | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '0 */12 * * *' | |
jobs: | |
components: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v2 | |
- name: Setup Flux CLI | |
uses: fluxcd/flux2/action@main | |
- name: Check for updates | |
id: upgrade | |
run: | | |
flux install \ | |
--components-extra=image-reflector-controller,image-automation-controller \ | |
--export > ./flux/flux-system/gotk-components.yaml | |
UGLY_VERSION="$(flux -v)" | |
VERSION="v${UGLY_VERSION#*flux version }" | |
echo "::set-output name=flux_version::$VERSION" | |
- name: Create Pull Request | |
uses: peter-evans/create-pull-request@v3 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
branch: upgrade-flux | |
delete-branch: true | |
committer: 'NetsocBot <[email protected]>' | |
author: 'NetsocBot <[email protected]>' | |
title: 'chore(deps): upgrade flux components to ${{ steps.upgrade.outputs.flux_version }}' | |
commit-message: Update to ${{ steps.upgrade.outputs.flux_version }} | |
body: | | |
Release notes: https://github.com/fluxcd/flux2/releases/tag/${{ steps.upgrade.outputs.flux_version }} | |
labels: flux/upgrade |