diff --git a/.github/workflows/update-check.yaml b/.github/workflows/update-check.yaml index 7e3f786..3814e0b 100644 --- a/.github/workflows/update-check.yaml +++ b/.github/workflows/update-check.yaml @@ -4,30 +4,37 @@ on: - 'flake.lock' jobs: check: - runs-on: ubuntu-latest + name: Check Flake outputs after flake update permissions: contents: read - name: Check Flake outputs after flake update + runs-on: ubuntu-latest outputs: - check-log: ${{ steps.flake-check.outputs.log }} + flake-check-stderr: ${{ steps.flake-check.outputs.OUT }} steps: - - name: Checkout + - name: Checkout Repo id: checkout uses: actions/checkout@v3 - name: Install Nix id: install-nix uses: cachix/install-nix-action@v30 - - name: Check Flake + - name: Run Flake Check id: flake-check + continue-on-error: true run: | - output=$(nix flake check) - echo "log=$output" >> $GITHUB_OUTPUT + { + echo "OUT<&1 + echo -e "\n" + echo "EOF" + } >> $GITHUB_OUTPUT + maybe_repair: runs-on: ubuntu-latest needs: check permissions: - contents: read + contents: write pull-requests: write + if: ${{ always() }} name: Check for deprecated/renamed options in flake check and submit a pull request to fix if found steps: - name: Checkout @@ -40,7 +47,7 @@ jobs: 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 issues found with the flake check output included. \n Flake Output: ${{ needs.check.outputs.flake-check-stderr }}" - 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": {