Use nix to install awscli (#140)

This commit is contained in:
Rok Garbas 2020-07-24 14:41:34 +02:00 committed by GitHub
parent c048af9f69
commit 3bf4907596
Failed to generate hash of commit

View file

@ -29,9 +29,15 @@ jobs:
with: with:
fetch-depth: 0 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 - name: Check for latest evaluation in ${{ matrix.channel }} channel
run: | run: |
sudo apt-get install -y awscli
if [ "${{ matrix.channel }}" = "unstable" ]; then if [ "${{ matrix.channel }}" = "unstable" ]; then
RELEASE=$(aws s3 ls --no-sign-request "$S3_URL/" | grep "/$" | cut -d" " -f29 | sort | tail -1 | sed 's|/||') RELEASE=$(aws s3 ls --no-sign-request "$S3_URL/" | grep "/$" | cut -d" " -f29 | sort | tail -1 | sed 's|/||')
else else
@ -40,13 +46,6 @@ jobs:
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 "::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) - 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'
run: | run: |
@ -54,8 +53,12 @@ jobs:
cp ./src-url ./eval-cache/ cp ./src-url ./eval-cache/
curl -H "Content-Type: application/json" "$(cat ./eval-cache/src-url)/builds" -o ./eval-cache/builds.json curl -H "Content-Type: application/json" "$(cat ./eval-cache/src-url)/builds" -o ./eval-cache/builds.json
- name: Installing Nix - name: Cache ${{ matrix.channel }} channel builds
uses: cachix/install-nix-action@v8 id: eval-cache
uses: actions/cache@v2
with:
path: ./eval-cache
key: eval-cache-${{ env.EVAL_ID }}
- name: Installing NixFlakes - name: Installing NixFlakes
run: | run: |