Skip to content

Commit

Permalink
refactor nix action
Browse files Browse the repository at this point in the history
Signed-off-by: Thing-han, Lim <[email protected]>
  • Loading branch information
potsrevennil committed Mar 26, 2024
1 parent 900efb9 commit e4914aa
Showing 1 changed file with 2 additions and 19 deletions.
21 changes: 2 additions & 19 deletions .github/actions/setup-nix/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,8 @@ description: Setup nix
runs:
using: composite
steps:
- name: install jq
shell: bash
run: |
if ! (command -v jq) &> /dev/null
then
sudo apt install -y --no-install-recommends jq
fi
- id: nixpkgs
shell: bash
run: |
if [ -f flake.lock ]; then
nixpkgs="flake:$(cat flake.lock | jq -r '.nodes.nixpkgs.locked // empty | .type + ":" + .owner + "/" + .repo + "/" + .rev')"
else
nixpkgs=channel:nixos-unstable
fi
echo "nixpkgs=$nixpkgs" >> "$GITHUB_OUTPUT"
- uses: cachix/install-nix-action@v25
with:
nix_path: nixpkgs=${{ steps.nixpkgs.outputs.nixpkgs }}
- uses: nixbuild/nix-quick-install-action@v27
with: {load_nixConfig: false}
- name: Prepare nix dev shell
shell: nix develop .#ci -c bash -e {0}
run: |

0 comments on commit e4914aa

Please sign in to comment.