Skip to content

Commit

Permalink
chore: Update Pub cache key and environment variables in checkout.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
PlugFox committed Aug 22, 2024
1 parent 2463319 commit b7af3fc
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/checkout.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ jobs:
image: dart:stable
env:
pub-cache-name: pub
PUB_CACHE: $HOME/.pub-cache
PATH: $HOME/.pub-cache/bin
timeout-minutes: 10
steps:
- name: 🚂 Get latest code
Expand All @@ -50,25 +52,24 @@ jobs:
uses: actions/cache/restore@v4
with:
path: |
$HOME/.pub-cache
${{ env.PUB_CACHE }}
key: ${{ runner.os }}-spinify-${{ env.pub-cache-name }}-${{ hashFiles('pubspec.yaml') }}

- name: 👷 Install Dependencies
id: install-dependencies
timeout-minutes: 1
run: |
export PUB_CACHE=$HOME/.pub-cache
export PATH="$PATH":"$HOME/.pub-cache/bin"
dart pub get --no-example
echo "PUB_CACHE=$PUB_CACHE"
echo "PUB_CACHE=${{ env.PUB_CACHE }}"
ls -la $HOME/.pub-cache
- name: 📥 Save Pub modules
id: cache-pub-save
uses: actions/cache/save@v4
with:
path: |
$HOME/.pub-cache
${{ env.PUB_CACHE }}
key: ${{ runner.os }}-spinify-${{ env.pub-cache-name }}-${{ hashFiles('pubspec.yaml') }}

- name: 🔎 Check format
Expand Down

0 comments on commit b7af3fc

Please sign in to comment.