From 7622152fea884a87ec881ccb21e609424d838f0d Mon Sep 17 00:00:00 2001 From: NotAShelf Date: Fri, 20 Oct 2023 11:48:58 +0300 Subject: [PATCH] CI: use DetSys Nix installer --- .github/workflows/editorconfig.yml | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/.github/workflows/editorconfig.yml b/.github/workflows/editorconfig.yml index 5b05f8b40..15ea262a1 100644 --- a/.github/workflows/editorconfig.yml +++ b/.github/workflows/editorconfig.yml @@ -8,14 +8,14 @@ on: jobs: check-editorconfig: runs-on: ubuntu-latest - if: "!contains(github.event.pull_request.title, '[skip treewide]')" + if: "!contains(github.event.pull_request.title, '[skip ci]')" steps: - name: Get list of changed files from PR env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | gh api \ - repos/NixOS/nixpkgs/pulls/${{github.event.number}}/files --paginate \ + repos/notashelf/neovim-flake/pulls/${{github.event.number}}/files --paginate \ | jq '.[] | select(.status != "removed") | .filename' \ > "$HOME/changed_files" @@ -29,15 +29,12 @@ jobs: ref: refs/pull/${{ github.event.pull_request.number }}/merge - name: Install Nix - uses: cachix/install-nix-action@v23 - with: - # nixpkgs commit is pinned so that it doesn't break - # editorconfig-checker 2.4.0 - nix_path: nixpkgs=https://github.com/NixOS/nixpkgs/archive/c473cc8714710179df205b153f4e9fa007107ff9.tar.gz + uses: DeterminateSystems/nix-installer-action@main + - uses: DeterminateSystems/magic-nix-cache-action@main - name: Checking EditorConfig run: | - cat "$HOME/changed_files" | nix-shell -p editorconfig-checker --run 'xargs -r editorconfig-checker -disable-indent-size' + cat "$HOME/changed_files" | nix-shell -p editorconfig-checker.out --run 'xargs -r editorconfig-checker -disable-indent-size' - if: ${{ failure() }} shell: bash