From 433f47d6a0f1384702e87434ee600c0269c1526f Mon Sep 17 00:00:00 2001 From: Danila Danko Date: Thu, 2 May 2024 21:12:03 +0300 Subject: [PATCH] refactor(ci): simplify if-s --- .github/workflows/buildjet-ci.yaml | 6 +++--- .github/workflows/ci.yaml | 6 +++--- nix/ci.nix | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/buildjet-ci.yaml b/.github/workflows/buildjet-ci.yaml index f1b4738f..8a86b1ba 100644 --- a/.github/workflows/buildjet-ci.yaml +++ b/.github/workflows/buildjet-ci.yaml @@ -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 }} @@ -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 diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 5540ac10..8f8dd281 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -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 }} @@ -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 diff --git a/nix/ci.nix b/nix/ci.nix index 444f36b0..3a467483 100644 --- a/nix/ci.nix +++ b/nix/ci.nix @@ -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 }} @@ -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