Skip to content
This repository has been archived by the owner on Jul 2, 2024. It is now read-only.

Commit

Permalink
test gh action with nix
Browse files Browse the repository at this point in the history
  • Loading branch information
florian-sanders-cc committed Mar 26, 2024
1 parent 7f4ea8f commit afcb5d1
Showing 1 changed file with 17 additions and 12 deletions.
29 changes: 17 additions & 12 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,22 @@ name: GitHub Actions Demo
run-name: ${{ github.actor }} is testing out GitHub Actions πŸš€
on: [push]
jobs:
Explore-GitHub-Actions:
Prefetch-npm-deps:
runs-on: ubuntu-latest
outputs:
NPM_DEPS_HASH: ${{ steps.prefetch.outputs.NPM_DEPS_HASH }}
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 '<nixpkgs>'
- name: prefetch
id: prefetch
run: echo "NPM_DEPS_HASH=$(prefetch-npm-deps package-lock.json)" >> $GITHUB_OUTPUT
- name: update
run: echo "hello ${{ steps.prefetch.outputs.NPM_DEPS_HASH }}"

0 comments on commit afcb5d1

Please sign in to comment.