Skip to content

Commit

Permalink
add attribute selector to load nix action
Browse files Browse the repository at this point in the history
  • Loading branch information
tateexon committed Jul 31, 2024
1 parent 045c408 commit ee81945
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 6 additions & 1 deletion .github/actions/load-nix/action.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
name: Load Nix
description: Load nix and make a call to clear out all the output on first run
inputs:
nix-flake-attribute:
description: The nix flake attribute to select a specific environment to use for commands
required: false
default: ''
runs:
using: 'composite'
steps:
Expand All @@ -10,4 +15,4 @@ runs:
- name: Pre-Load Nix
shell: bash
run: |
nix develop -c sh -c "echo \"load\""
nix develop ${{inputs.nix-flake-attribute}} -c sh -c "echo \"load\""
2 changes: 2 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ jobs:
fetch-depth: 0 # needed for go-change-delta to work correctly
- name: Load Nix
uses: ./.github/actions/load-nix
with:
nix-flake-attribute: ".#ci-runtests"
- name: Get previous commit SHA
if: github.ref == 'refs/heads/main' # Ensures this job only runs on pushes to main
id: previous_commit
Expand Down

0 comments on commit ee81945

Please sign in to comment.