From 3bf490759620a6282f20f8601c98246935ae982b Mon Sep 17 00:00:00 2001 From: Rok Garbas Date: Fri, 24 Jul 2020 14:41:34 +0200 Subject: [PATCH] Use nix to install awscli (#140) --- .github/workflows/cron.yml | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/.github/workflows/cron.yml b/.github/workflows/cron.yml index 81475f2..5bc38b1 100644 --- a/.github/workflows/cron.yml +++ b/.github/workflows/cron.yml @@ -29,9 +29,15 @@ jobs: with: fetch-depth: 0 + - name: Installing Nix + uses: cachix/install-nix-action@v8 + + - name: Installing awscli + run: | + nix-env -iA nixpkgs.awscli + - name: Check for latest evaluation in ${{ matrix.channel }} channel run: | - sudo apt-get install -y awscli if [ "${{ matrix.channel }}" = "unstable" ]; then RELEASE=$(aws s3 ls --no-sign-request "$S3_URL/" | grep "/$" | cut -d" " -f29 | sort | tail -1 | sed 's|/||') else @@ -40,13 +46,6 @@ jobs: aws s3 cp --no-sign-request "$S3_URL/$RELEASE/src-url" ./ echo "::set-env name=EVAL_ID::$(cat src-url | cut -c30-)" - - name: Cache ${{ matrix.channel }} channel builds - id: eval-cache - uses: actions/cache@v2 - with: - path: ./eval-cache - key: eval-cache-${{ env.EVAL_ID }} - - name: Download latest builds for ${{ matrix.channel }} channel (if needed) if: steps.eval-cache.outputs.cache-hit != 'true' run: | @@ -54,8 +53,12 @@ jobs: cp ./src-url ./eval-cache/ curl -H "Content-Type: application/json" "$(cat ./eval-cache/src-url)/builds" -o ./eval-cache/builds.json - - name: Installing Nix - uses: cachix/install-nix-action@v8 + - name: Cache ${{ matrix.channel }} channel builds + id: eval-cache + uses: actions/cache@v2 + with: + path: ./eval-cache + key: eval-cache-${{ env.EVAL_ID }} - name: Installing NixFlakes run: |