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 fa0e11e commit 1520fe4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/provision-darwin.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ dfx cache install

# check the current ic-commit found in the main branch, check if it differs from the one in this PR branch
# if so, update the dfx cache with the latest ic artifacts
if [ -f ".ic-commit" ]; then
if [ -f "${GITHUB_WORKSPACE}/.ic-commit" ]; then
stable_sha=$(curl https://raw.githubusercontent.com/dfinity/examples/master/.ic-commit)
current_sha=$(sed <.ic-commit 's/#.*$//' | sed '/^$/d')
current_sha=$(sed <"$GITHUB_WORKSPACE/.ic-commit" 's/#.*$//' | sed '/^$/d')
if [ "$current_sha" != "$stable_sha" ]; then
./update-dfx-cache.sh
fi
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/provision-linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ source "$HOME/.local/share/dfx/env"
dfx cache install
# check the current ic-commit found in the main branch, check if it differs from the one in this PR branch
# if so, update the dfx cache with the latest ic artifacts
if [ -f ".ic-commit" ]; then
if [ -f "${GITHUB_WORKSPACE}/.ic-commit" ]; then
stable_sha=$(curl https://raw.githubusercontent.com/dfinity/examples/master/.ic-commit)
current_sha=$(sed <.ic-commit 's/#.*$//' | sed '/^$/d')
current_sha=$(sed <"$GITHUB_WORKSPACE/.ic-commit" 's/#.*$//' | sed '/^$/d')
if [ "$current_sha" != "$stable_sha" ]; then
./update-dfx-cache.sh
fi
Expand Down

0 comments on commit 1520fe4

Please sign in to comment.