Skip to content

Commit

Permalink
add workflow to check flake
Browse files Browse the repository at this point in the history
  • Loading branch information
NotM32 committed Dec 14, 2024
1 parent 1e74c11 commit 16034b3
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/update-check.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
on:
push:
paths:
- 'flake.lock'
jobs:
check:
runs-on: ubuntu-latest
permissions:
contents: read
name: Check Flake outputs after flake update
outputs:
check-log: ${{ steps.flake-check.outputs.log }}
steps:
- name: Checkout
id: checkout
uses: actions/checkout@v3
- name: Install Nix
id: install-nix
uses: cachix/install-nix-action@v30
- name: Check Flake
id: flake-check
run: |
output=$(nix flake check)
echo "log=$output" >> $GITHUB_OUTPUT
maybe_repair:
needs: check
permissions:
content: read
pull-request: write
name: Check for deprecated/renamed options in flake check and submit a pull request to fix if found
steps:
- name: Run GPT Prompt
uses: DukeLuo/[email protected]
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
with:
cmd: |
promptr --model "gpt-4o" \
--prompt "Please make fixes to any of the following issues with the flake check output included: [option renamed, option deprecated, option removed]. \n Flake Output: \n ${{ jobs.check.outputs.check-log }}"
- name: Create Pull Request
uses: peter-evans/create-pull-request@v5
with:
branch: ai-flake-update-fixes
title: "flake-update: Fix options changed during flake update"
commit-message: "flake-update: Fix options changed in flake update"

0 comments on commit 16034b3

Please sign in to comment.