This repository has been archived by the owner on Jul 2, 2024. It is now read-only.
test gh action with nix #25
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: GitHub Actions Demo | |
run-name: ${{ github.actor }} is testing out GitHub Actions 🚀 | |
on: [push] | |
jobs: | |
Explore-GitHub-Actions: | |
runs-on: ubuntu-latest | |
steps: | |
- 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 '<nixpkgs>' | |
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: | |
- name: update | |
run: echo "hello $NPM_DEPS_HASH" | |