From 7ee54a8625f8609a7ae9f9578637add3f3e77c62 Mon Sep 17 00:00:00 2001 From: m32 Date: Fri, 13 Dec 2024 20:23:50 -0700 Subject: [PATCH] run when failed like it needs --- .github/workflows/update-check.yaml | 8 +++++--- flake.lock | 6 +++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/.github/workflows/update-check.yaml b/.github/workflows/update-check.yaml index 7e3f786..e9ab5d9 100644 --- a/.github/workflows/update-check.yaml +++ b/.github/workflows/update-check.yaml @@ -20,13 +20,14 @@ jobs: - name: Check Flake id: flake-check run: | - output=$(nix flake check) + output=$(nix flake check 2&>1) echo "log=$output" >> $GITHUB_OUTPUT maybe_repair: runs-on: ubuntu-latest needs: check + if: ${{ always() }} permissions: - contents: read + contents: write pull-requests: write name: Check for deprecated/renamed options in flake check and submit a pull request to fix if found steps: @@ -37,10 +38,11 @@ jobs: uses: DukeLuo/gpt-runner@v1.0.0 env: OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} + CHECK_LOG: ${{ needs.check.outputs.check-log }} 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 ${{ needs.jobs.check.outputs.check-log }}" + --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: $CHECK_LOG\n" - name: Create Pull Request uses: peter-evans/create-pull-request@v5 with: diff --git a/flake.lock b/flake.lock index 9a821de..43c137e 100644 --- a/flake.lock +++ b/flake.lock @@ -703,11 +703,11 @@ "treefmt-nix": "treefmt-nix_2" }, "locked": { - "lastModified": 1734142061, - "narHash": "sha256-Ty/noNHJEnuz+7vl4U/8aIiBsFlmLSkMw0Me6xKSRTA=", + "lastModified": 1734146452, + "narHash": "sha256-aY6OIfq0eaP3aHqLJVGW942tOxrw/nmvMUoMWn6WySM=", "owner": "nix-community", "repo": "NUR", - "rev": "790ba51f04ffd55a391903408afde3790b472334", + "rev": "0a769f94417536b76c57010cb5d7b55af820d479", "type": "github" }, "original": {