Skip to content

Commit

Permalink
refactor(ci): simplify if-s
Browse files Browse the repository at this point in the history
  • Loading branch information
deemp committed May 2, 2024
1 parent fa3e253 commit 433f47d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/buildjet-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -115,11 +115,11 @@ jobs:
run: ${{ env.pin_nixpkgs }}

- name: Install nixpkgs#poetry
if: ${{ matrix.id == 1 }}
if: matrix.id == 1
run: nix profile install nixpkgs#poetry

- name: Install nixpkgs#nodejs
if: ${{ matrix.id == 2 }}
if: matrix.id == 2
run: nix profile install nixpkgs#nodejs

- name: Save Nix store - ${{ matrix.id }}
Expand Down Expand Up @@ -314,7 +314,7 @@ jobs:
- uses: nixbuild/nix-quick-install-action@v28

- name: Restore and save Nix store
if: ${{ matrix.do-cache }}
if: matrix.do-cache
uses: ./.
with:
# save a new cache every time ci file changes
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -123,11 +123,11 @@ jobs:
run: ${{ env.pin_nixpkgs }}

- name: Install nixpkgs#poetry
if: ${{ matrix.id == 1 }}
if: matrix.id == 1
run: nix profile install nixpkgs#poetry

- name: Install nixpkgs#nodejs
if: ${{ matrix.id == 2 }}
if: matrix.id == 2
run: nix profile install nixpkgs#nodejs

- name: Save Nix store - ${{ matrix.id }}
Expand Down Expand Up @@ -315,7 +315,7 @@ jobs:
- uses: nixbuild/nix-quick-install-action@v28

- name: Restore and save Nix store
if: ${{ matrix.do-cache }}
if: matrix.do-cache
uses: ./.
with:
# save a new cache every time ci file changes
Expand Down
6 changes: 3 additions & 3 deletions nix/ci.nix
Original file line number Diff line number Diff line change
Expand Up @@ -156,11 +156,11 @@ in
run: ''${{ env.pin_nixpkgs }}
- name: Install nixpkgs#poetry
if: ''${{ matrix.id == 1 }}
if: matrix.id == 1
run: nix profile install nixpkgs#poetry
- name: Install nixpkgs#nodejs
if: ''${{ matrix.id == 2 }}
if: matrix.id == 2
run: nix profile install nixpkgs#nodejs
- name: Save Nix store - ''${{ matrix.id }}
Expand Down Expand Up @@ -304,7 +304,7 @@ in
${indent 6 nix-quick-install-action}
- name: Restore and save Nix store
if: ''${{ matrix.do-cache }}
if: matrix.do-cache
uses: ./.
with:
# save a new cache every time ci file changes
Expand Down

0 comments on commit 433f47d

Please sign in to comment.