Skip to content

Update nixhelm #61

Update nixhelm

Update nixhelm #61

name: Update nixhelm
on:
# If you want to run this workflow manually.
workflow_dispatch:
# Run every saturday at 8:00
schedule:
- cron: '0 8 * * 6'
jobs:
upgrade:
runs-on: ubuntu-latest
env:
BRANCH: promote/env/prod
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v20
with:
extra_nix_config: |
extra-experimental-features = nix-command flakes
- name: Setup python
uses: actions/setup-python@v5
with:
python-version: '3.12'
cache: 'pip'
cache-dependency-path: '.github/llm-review/requirements.txt'
- name: Intall dependencies
run: |
pip install -r .github/llm-review/requirements.txt
- shell: bash
run: |
git checkout -B ${{env.BRANCH}}
nix flake lock --update-input nixhelm
- uses: EndBug/add-and-commit@v9
id: commit-nixhelm
with:
default_author: github_actions
message: "chore: update nixhelm"
fetch: false
push: false
- shell: bash
if: ${{ steps.commit-nixhelm.outputs.committed == 'true' }}
run: |
# In case any crds changed in a helm chart update
nix run .#generate
- uses: EndBug/add-and-commit@v9
if: ${{ steps.commit-nixhelm.outputs.committed == 'true' }}
with:
default_author: github_actions
message: "chore: generate resource options"
fetch: false
push: false
- uses: arnarg/nixidy/actions/switch@main
if: ${{ steps.commit-nixhelm.outputs.committed == 'true' }}
with:
environment: .#prod
- uses: EndBug/add-and-commit@v9
id: commit
with:
default_author: github_actions
message: "chore: promote to prod ${{github.sha}}"
fetch: false
push: --set-upstream origin ${{env.BRANCH}} --force
- shell: bash
id: review
if: ${{ steps.commit.outputs.pushed == 'true' }}
env:
HYPERBOLIC_API_KEY: ${{ secrets.HYPERBOLIC_API_KEY }}
run: |
git diff origin/main ${{env.BRANCH}} | python .github/llm-review/main.py
- uses: thomaseizinger/create-pull-request@1.4.0
if: ${{ steps.commit.outputs.pushed == 'true' }}
with:
github_token: ${{github.token}}
head: ${{env.BRANCH}}
base: main
title: Update nixhelm input
body: ${{steps.review.outputs.review || ''}}