diff --git a/.github/workflows/update-dfx-cache.sh b/.github/workflows/update-dfx-cache.sh index a3f57ef1e..36aac6cb1 100755 --- a/.github/workflows/update-dfx-cache.sh +++ b/.github/workflows/update-dfx-cache.sh @@ -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