This repository has been archived by the owner on Mar 24, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
45 lines (40 loc) · 1.52 KB
/
flux-cron.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
42
43
44
45
---
name: Cron - Update Flux
on: # yamllint disable-line rule:truthy
workflow_dispatch:
schedule:
- cron: '0 12 * * *'
jobs:
flux-upgrade:
runs-on: ubuntu-20.04
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}" \
--components-extra=image-reflector-controller,image-automation-controller \
--network-policy=false \
--export > ./clusters/scw-dc5/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@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: "Patrik Cyvoct <Sh4d1@users.noreply.github.com>"
author: "Patrik Cyvoct <Sh4d1@users.noreply.github.com>"
assignees: "Sh4d1"
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