From 7426982b071f1b74cf658c30e86a8c30abad5cb2 Mon Sep 17 00:00:00 2001 From: Rok Garbas Date: Tue, 17 Nov 2020 09:58:25 +0100 Subject: [PATCH] Update github actions (#227) --- .github/workflows/cron.yml | 16 ++++++++++------ .github/workflows/main.yml | 16 ++++++++++------ 2 files changed, 20 insertions(+), 12 deletions(-) diff --git a/.github/workflows/cron.yml b/.github/workflows/cron.yml index 4472352..662d97d 100644 --- a/.github/workflows/cron.yml +++ b/.github/workflows/cron.yml @@ -31,13 +31,18 @@ jobs: fetch-depth: 0 - name: Installing Nix - uses: cachix/install-nix-action@v8 + uses: cachix/install-nix-action@v12 - - uses: cachix/cachix-action@v6 + - uses: cachix/cachix-action@v8 with: name: nixos-search signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}' + - name: Install unstable channel + run: | + nix-channel --add https://nixos.org/channels/nixpkgs-unstable + nix-channel --update + - name: Installing awscli run: | nix-env -iA nixpkgs.awscli @@ -50,7 +55,7 @@ jobs: RELEASE=$(aws s3 ls --no-sign-request "$S3_URL/" | grep "nixpkgs-${{ matrix.channel }}pre" | grep "/$" | cut -d" " -f29 | sort | tail -1 | sed 's|/||') fi aws s3 cp --no-sign-request "$S3_URL/$RELEASE/src-url" ./ - echo "::set-env name=EVAL_ID::$(cat src-url | cut -c30-)" + echo "EVAL_ID=$(cat src-url | cut -c30-)" >> $GITHUB_ENV - name: Download latest builds for ${{ matrix.channel }} channel (if needed) if: steps.eval-cache.outputs.cache-hit != 'true' @@ -69,14 +74,13 @@ jobs: - name: Installing NixFlakes run: | nix-env -iA nixpkgs.nixFlakes - echo "::add-path::$HOME/.nix-profile/bin" echo 'experimental-features = nix-command flakes' | sudo tee -a /etc/nix/nix.conf - nix --version + $HOME/.nix-profile/bin/nix --version cat /etc/nix/nix.conf - name: Building import_scripts run: | - nix build ./#packages.x86_64-linux.import_scripts + $HOME/.nix-profile/bin/nix build ./#packages.x86_64-linux.import_scripts - name: Import ${{ matrix.channel }} channel run: | diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 1587d9d..39b8d95 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -14,33 +14,37 @@ jobs: fetch-depth: 0 - name: Installing Nix - uses: cachix/install-nix-action@v9 + uses: cachix/install-nix-action@v12 - - uses: cachix/cachix-action@v6 + - uses: cachix/cachix-action@v8 with: name: nixos-search signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}' + - name: Install unstable channel + run: | + nix-channel --add https://nixos.org/channels/nixpkgs-unstable + nix-channel --update + - name: Installing NixFlakes run: | nix-env -iA nixpkgs.nixFlakes - echo "::add-path::$HOME/.nix-profile/bin" echo 'experimental-features = nix-command flakes' | sudo tee -a /etc/nix/nix.conf nix --version cat /etc/nix/nix.conf - name: Building import_scripts run: | - nix build ./#packages.x86_64-linux.import_scripts + $HOME/.nix-profile/bin/nix build ./#packages.x86_64-linux.import_scripts - name: Building search.nixos.org run: | - nix build ./#packages.x86_64-linux.frontend + $HOME/.nix-profile/bin/nix build ./#packages.x86_64-linux.frontend mkdir ./dist cp -RL ./result/* ./dist/ - name: Deploy to Netlify - uses: nwtgck/actions-netlify@v1.0.5 + uses: nwtgck/actions-netlify@v1.1.11 env: NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}