This repository has been archived by the owner on Dec 13, 2023. It is now read-only.
update-flux #323
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: update-flux | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: "0 12 * * *" | |
jobs: | |
components: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Flux CLI | |
uses: fluxcd/flux2/action@main | |
- name: Check for updates | |
id: update | |
run: | | |
CLI_VERSION="$(flux -v)" | |
VERSION="v${CLI_VERSION#*flux version }" | |
flux install \ | |
--export > ./cluster/flux-system/gotk-components.yaml | |
echo "::set-output name=flux_version::$VERSION" | |
- name: Create Pull Request | |
uses: peter-evans/create-pull-request@v5 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
branch: "flux/update-${{ steps.update.outputs.flux_version }}" | |
delete-branch: true | |
commit-message: "chore(deps): update flux components to ${{ steps.update.outputs.flux_version }}" | |
title: "chore(deps): update flux components to ${{ steps.update.outputs.flux_version }}" | |
body: | | |
Release notes: https://github.com/fluxcd/flux2/releases/tag/${{ steps.update.outputs.flux_version }} | |
labels: flux/update |