-
Notifications
You must be signed in to change notification settings - Fork 1
36 lines (33 loc) · 1.2 KB
/
update.yml
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
name: update-flux
on:
workflow_dispatch:
schedule:
- cron: "0 * * * *"
jobs:
components:
strategy:
matrix:
cluster: [production]
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- name: Setup Flux CLI
uses: fluxcd/flux2/action@main
- name: Check for updates
id: update
run: |
flux install \
--components-extra=image-reflector-controller,image-automation-controller \
--export > ./clusters/${{ matrix.cluster }}/flux-system/gotk-components.yaml
VERSION="$(flux -v)"
echo "::set-output name=flux_version::$VERSION"
- name: Create Pull Request
uses: peter-evans/create-pull-request@v7
with:
token: ${{ secrets.GITHUB_TOKEN }}
branch: update-flux-${{ matrix.cluster }}
commit-message: Update ${{ matrix.cluster }} to ${{ steps.update.outputs.flux_version }}
title: Update ${{ matrix.cluster }} to ${{ steps.update.outputs.flux_version }}
body: |
${{ steps.update.outputs.flux_version }}