Skip to content

Commit

Permalink
chore: use GITHUB_WORKSPACE env
Browse files Browse the repository at this point in the history
  • Loading branch information
Jason I committed Apr 29, 2024
1 parent dcb9e3d commit dc55de3
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions .github/workflows/update-dfx-cache.sh
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
#!/bin/bash

current_sha=$(sed <"$GITHUB_WORKSPACE/.ic-commit" 's/#.*$//' | sed '/^$/d')

# Download latest ic artifacts
curl -O "https://download.dfinity.systems/ic/$latest_sha/binaries/x86_64-linux/replica.gz"
curl -O "https://download.dfinity.systems/ic/$latest_sha/binaries/x86_64-linux/canister_sandbox.gz"
curl -O "https://download.dfinity.systems/ic/$latest_sha/binaries/x86_64-linux/ic-admin.gz"
curl -O "https://download.dfinity.systems/ic/$latest_sha/binaries/x86_64-linux/ic-btc-adapter.gz"
curl -O "https://download.dfinity.systems/ic/$latest_sha/binaries/x86_64-linux/ic-https-outcalls-adapter.gz"
curl -O "https://download.dfinity.systems/ic/$latest_sha/binaries/x86_64-linux/ic-nns-init.gz"
curl -O "https://download.dfinity.systems/ic/$latest_sha/binaries/x86_64-linux/ic-starter.gz"
curl -O "https://download.dfinity.systems/ic/$latest_sha/binaries/x86_64-linux/sandbox_launcher.gz"
curl -O "https://download.dfinity.systems/ic/$latest_sha/binaries/x86_64-linux/sns.gz"
curl -O "https://download.dfinity.systems/ic/$current_sha/binaries/x86_64-linux/replica.gz"
curl -O "https://download.dfinity.systems/ic/$current_sha/binaries/x86_64-linux/canister_sandbox.gz"
curl -O "https://download.dfinity.systems/ic/$current_sha/binaries/x86_64-linux/ic-admin.gz"
curl -O "https://download.dfinity.systems/ic/$current_sha/binaries/x86_64-linux/ic-btc-adapter.gz"
curl -O "https://download.dfinity.systems/ic/$current_sha/binaries/x86_64-linux/ic-https-outcalls-adapter.gz"
curl -O "https://download.dfinity.systems/ic/$current_sha/binaries/x86_64-linux/ic-nns-init.gz"
curl -O "https://download.dfinity.systems/ic/$current_sha/binaries/x86_64-linux/ic-starter.gz"
curl -O "https://download.dfinity.systems/ic/$current_sha/binaries/x86_64-linux/sandbox_launcher.gz"
curl -O "https://download.dfinity.systems/ic/$current_sha/binaries/x86_64-linux/sns.gz"

# Overwrite artifacts in dfx cache
gzip -d replica.gz
Expand Down

0 comments on commit dc55de3

Please sign in to comment.