Update github actions (#227)

This commit is contained in:
Rok Garbas 2020-11-17 09:58:25 +01:00 committed by GitHub
parent 1407641e45
commit 7426982b07
Failed to generate hash of commit
2 changed files with 20 additions and 12 deletions

View file

@ -31,13 +31,18 @@ jobs:
fetch-depth: 0 fetch-depth: 0
- name: Installing Nix - 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: with:
name: nixos-search name: nixos-search
signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}' 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 - name: Installing awscli
run: | run: |
nix-env -iA nixpkgs.awscli 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|/||') RELEASE=$(aws s3 ls --no-sign-request "$S3_URL/" | grep "nixpkgs-${{ matrix.channel }}pre" | grep "/$" | cut -d" " -f29 | sort | tail -1 | sed 's|/||')
fi fi
aws s3 cp --no-sign-request "$S3_URL/$RELEASE/src-url" ./ 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) - name: Download latest builds for ${{ matrix.channel }} channel (if needed)
if: steps.eval-cache.outputs.cache-hit != 'true' if: steps.eval-cache.outputs.cache-hit != 'true'
@ -69,14 +74,13 @@ jobs:
- name: Installing NixFlakes - name: Installing NixFlakes
run: | run: |
nix-env -iA nixpkgs.nixFlakes 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 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 cat /etc/nix/nix.conf
- name: Building import_scripts - name: Building import_scripts
run: | 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 - name: Import ${{ matrix.channel }} channel
run: | run: |

View file

@ -14,33 +14,37 @@ jobs:
fetch-depth: 0 fetch-depth: 0
- name: Installing Nix - 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: with:
name: nixos-search name: nixos-search
signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}' 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 - name: Installing NixFlakes
run: | run: |
nix-env -iA nixpkgs.nixFlakes 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 echo 'experimental-features = nix-command flakes' | sudo tee -a /etc/nix/nix.conf
nix --version nix --version
cat /etc/nix/nix.conf cat /etc/nix/nix.conf
- name: Building import_scripts - name: Building import_scripts
run: | 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 - name: Building search.nixos.org
run: | run: |
nix build ./#packages.x86_64-linux.frontend $HOME/.nix-profile/bin/nix build ./#packages.x86_64-linux.frontend
mkdir ./dist mkdir ./dist
cp -RL ./result/* ./dist/ cp -RL ./result/* ./dist/
- name: Deploy to Netlify - name: Deploy to Netlify
uses: nwtgck/actions-netlify@v1.0.5 uses: nwtgck/actions-netlify@v1.1.11
env: env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}