From 19a4f60b801b9784e97aeaac72c448e02760d830 Mon Sep 17 00:00:00 2001 From: Florian Sanders Date: Tue, 26 Mar 2024 12:44:57 +0100 Subject: [PATCH] test gh action with nix --- .github/workflows/test.yml | 31 ++++++++++++++++++++----------- 1 file changed, 20 insertions(+), 11 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 15a61d6..3ceac7f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -5,14 +5,23 @@ jobs: Explore-GitHub-Actions: runs-on: ubuntu-latest steps: - - run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event." - - run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!" - - run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}." - - name: Check out repository code - uses: actions/checkout@v4 - - run: echo "💡 The ${{ github.repository }} repository has been cloned to the runner." - - run: echo "🖥️ The workflow is now ready to test your code on the runner." - - name: List files in the repository - run: | - ls ${{ github.workspace }} - - run: echo "🍏 This job's status is ${{ job.status }}." + - uses: actions/checkout@v4 + - name: Install Nix + uses: cachix/install-nix-action@v26 + with: + github_access_token: ${{ secrets.PERSO_TOKEN }} + nix_path: nixpkgs=channel:nixos-unstable + - name: Install prefetch-npm-deps + run: nix-env -i prefetch-npm-deps -f '' + Prefetch-npm-deps: + outputs: + NPM_DEPS_HASH: ${{ steps.prefetch.outputs.NPM_DEPS_HASH }} + steps: + - name: prefetch + - id: prefetch + - run: echo "NPM_DEPS_HASH=$(prefetch-npm-deps package-lock.json)" >> "$GITHUB_OUTPUT" + Update flake: + needs: [Prefetch-npm-deps] + steps: update + - run echo "hello $NPM_DEPS_HASH" +