Skip to content

Commit

Permalink
ci: refactor bootstrap.cache step
Browse files Browse the repository at this point in the history
  • Loading branch information
madlabman committed Feb 29, 2024
1 parent c968b9f commit 9c7ed8f
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ jobs:
actions:
uses: lidofinance/linters/.github/workflows/actions.yml@master

# Maybe to make it reusable workflow instead?
bootstrap:
name: Bootstrap environment
runs-on: ubuntu-latest
Expand All @@ -27,8 +28,14 @@ jobs:
- name: Build cache params
id: cache
run: |
echo "path=~/.cargo/bin/" >> "$GITHUB_OUTPUT"
echo "key=forge-${FORGE_REV}-just-${JUST_TAG}-${{ runner.os }}-${{ runner.arch }}" >> "$GITHUB_OUTPUT"
echo "path=$CACHE_PATH" >> "$GITHUB_OUTPUT"
echo "$KEY_INPUT" | md5sum | awk '{print $1}' | xargs -I% echo "key=cargobin-%-${RUNNER_OS}" >> "$GITHUB_OUTPUT"
env:
CACHE_PATH: |
~/.cargo/bin/
KEY_INPUT: |
forge:${FORGE_REV}
just:${JUST_TAG}
- uses: actions/cache@v3
id: get-cache
Expand Down

0 comments on commit 9c7ed8f

Please sign in to comment.