mirror of
https://github.com/auricom/home-cluster.git
synced 2025-10-01 07:55:06 +02:00
51 lines
1.7 KiB
YAML
51 lines
1.7 KiB
YAML
---
|
|
name: Schedule - Flux Update
|
|
|
|
on: # yamllint disable-line rule:truthy
|
|
workflow_dispatch:
|
|
schedule:
|
|
- cron: "0 */4 * * *"
|
|
push:
|
|
branches:
|
|
- main
|
|
paths:
|
|
- ".github/workflows/schedule-flux-update.yaml"
|
|
|
|
jobs:
|
|
flux-update:
|
|
name: Flux Update
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
- name: Generate Token
|
|
uses: tibdex/github-app-token@v1
|
|
id: generate-token
|
|
with:
|
|
app_id: "${{ secrets.BOT_APP_ID }}"
|
|
private_key: "${{ secrets.BOT_APP_PRIVATE_KEY }}"
|
|
- name: Install Flux
|
|
uses: fluxcd/flux2/action@main
|
|
- name: Flux Update
|
|
id: update
|
|
run: |
|
|
UGLY_VERSION="$(flux -v)"
|
|
VERSION="v${UGLY_VERSION#*flux version }"
|
|
flux install --version="${VERSION}" \
|
|
--network-policy=false \
|
|
--export > ./cluster/base/flux-system/gotk-components.yaml
|
|
echo "::set-output name=flux_version::$VERSION"
|
|
- name: Create pull request
|
|
uses: peter-evans/create-pull-request@v4
|
|
with:
|
|
token: "${{ steps.generate-token.outputs.token }}"
|
|
branch: "github-action/flux-update-${{ steps.update.outputs.flux_version }}"
|
|
delete-branch: true
|
|
title: "chore(github-action): update flux components to ${{ steps.update.outputs.flux_version }}"
|
|
signoff: true
|
|
commit-message: "chore(github-action): 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: |
|
|
renovate/github-action
|