Fix JQ error in nix-shell environment
For some reason, nix-shell doesn't interact nicely with github actions
when called from a script. This PR makes the shell package requirement
explicit.
@@ -41,16 +41,37 @@ jobs:
signingKey: '${{ secrets.RV_DEVOPS_CACHIX_TOKEN }}'
- name: 'Build and cache K Framework'
- run: |
- export GC_DONT_GC=1
- export CACHIX_AUTH_TOKEN=${{ secrets.RV_DEVOPS_CACHIX_TOKEN }}
- nix shell nixpkgs#jq
+ uses: workflow/nix-shell-action@v3
+ env:
+ GC_DONT_GC: 1
+ CACHIX_AUTH_TOKEN: '${{ secrets.RV_DEVOPS_CACHIX_TOKEN }}'
+ with:
+ packages: jq
+ script: |
+ k=$(nix build .#k --json | jq -r '.[].outputs | to_entries[].value')
+ drv=$(nix-store --query --deriver ${k})
+ nix-store --query --requisites --include-outputs ${drv} # | cachix push k-framework
+
+ - name: 'Build and cache kup'
+ uses: workflow/nix-shell-action@v3
+ env:
+ GC_DONT_GC: 1
+ CACHIX_AUTH_TOKEN: '${{ secrets.RV_DEVOPS_CACHIX_TOKEN }}'
+ with:
+ packages: jq
+ script: |
k=$(nix build .#k --json | jq -r '.[].outputs | to_entries[].value')
drv=$(nix-store --query --deriver ${k})
nix-store --query --requisites --include-outputs ${drv} | cachix push k-framework
- name: 'Build and cache kup'
- run: |
+ uses: workflow/nix-shell-action@v3
+ env:
+ GC_DONT_GC: 1
+ CACHIX_AUTH_TOKEN: '${{ secrets.RV_DEVOPS_CACHIX_TOKEN }}'
+ with:
+ packages: jq
+ script: |
kup=$(nix build .#kup --json | jq -r '.[].outputs | to_entries[].value')
drv=$(nix-store --query --deriver ${kup})
nix-store --query --requisites --include-outputs ${drv} | cachix push k-framework
