diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4264deb9..b02eb3b3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -25,6 +25,13 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@v4 + with: + token: ${{ secrets.PUSH_TOKEN }} + + - name: Set Git user info + run: | + git config user.name 'github-actions[bot]' + git config user.email 'github-actions[bot]@users.noreply.github.com' - name: Get short revision id: rev @@ -41,13 +48,11 @@ jobs: 'nixpkgs#nixfmt-rfc-style' -- . - name: Commit changes - env: - GITHUB_TOKEN: ${{ secrets.PUSH_TOKEN }} - uses: planetscale/ghcommit-action@v0.1.39 - with: - commit_message: "style: format ${{ steps.rev.outputs.rev }}" - repo: "${{ github.repository }}" - branch: "${{ github.head_ref || github.ref_name }}" + run: | + if ! git diff --color=always --exit-code; then + git commit -am "style: format ${{ steps.rev.outputs.rev }}" + git push + fi validate-sources: name: Validate sources diff --git a/dev/flake.nix b/dev/flake.nix index f00b1d27..8e593a34 100644 --- a/dev/flake.nix +++ b/dev/flake.nix @@ -17,12 +17,12 @@ }; outputs = - { - self, - nixpkgs, - nixpkgs-stable, - home-manager, - home-manager-stable, + { self + , nixpkgs + , nixpkgs-stable + , home-manager + , home-manager-stable + , }: let systems = [ @@ -41,11 +41,10 @@ in { apps = forAllSystems ( - { - lib, - pkgs, - system, - ... + { lib + , pkgs + , system + , ... }: { add-source = { @@ -73,11 +72,10 @@ ); checks = forAllSystems ( - { - lib, - pkgs, - system, - ... + { lib + , pkgs + , system + , ... }: lib.optionalAttrs pkgs.stdenv.isLinux { module-test-unstable = pkgs.callPackage ../test.nix { inherit home-manager; }; @@ -90,11 +88,10 @@ formatter = forAllSystems (pkgs: pkgs.nixfmt-rfc-style); packages = forAllSystems ( - { - lib, - pkgs, - system, - ... + { lib + , pkgs + , system + , ... }: let version = self.shortRev or self.dirtyShortRev or "unknown";