-
Notifications
You must be signed in to change notification settings - Fork 3
41 lines (39 loc) · 1.44 KB
/
update-flux-home.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
---
name: Update flux @home
on:
workflow_dispatch:
schedule:
- cron: "44 4 * * *"
jobs:
components:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Setup Flux CLI
uses: fluxcd/flux2/action@main
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Update Flux components
id: update
run: |
UGLY_VERSION="$(flux -v)"
VERSION="v${UGLY_VERSION#*flux version }"
flux install --version="${VERSION}" \
--export > ./cluster-home/operations/flux-system/gotk-components.yaml
echo "flux_version=${VERSION}" >> $GITHUB_OUTPUT
- name: Create pull request for Flux update
uses: peter-evans/create-pull-request@v5
with:
token: ${{ secrets.GITHUB_TOKEN }}
branch: "flux/update-${{ steps.update.outputs.flux_version }}"
delete-branch: true
title: "Update flux components to ${{ steps.update.outputs.flux_version }} @home"
signoff: true
committer: "${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>"
author: "${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>"
assignees: "tbouska"
commit-message: "Update flux components to ${{ steps.update.outputs.flux_version }} @home"
body: |
Release notes: https://github.com/fluxcd/flux2/releases/tag/${{ steps.update.outputs.flux_version }}
labels: flux/update