Skip to content

Commit ae740f0

Browse files
committed
chore: use custom directories for ASDF core and data
1 parent 745d07f commit ae740f0

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

.github/workflows/pre-commit.yaml

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,36 +6,33 @@ on:
66
jobs:
77
pre-commit:
88
runs-on: ubuntu-latest
9-
# Define custom ASDF installation paths to avoid conflicts in the home directory
9+
# CORRECTED: Use standard $RUNNER_TEMP env var, not the ${{ runner.temp }} context
1010
env:
11-
ASDF_DIR: ${{ runner.temp }}/asdf-core
12-
ASDF_DATA_DIR: ${{ runner.temp }}/asdf-data
11+
ASDF_DIR: $RUNNER_TEMP/asdf-core
12+
ASDF_DATA_DIR: $RUNNER_TEMP/asdf-data
1313
steps:
1414
- uses: actions/checkout@v3
1515

1616
# --- 1. ASDF Caching and Installation ---
1717
- name: Cache ASDF Tool Versions
1818
uses: actions/cache@v4
1919
with:
20-
# Cache only the large installed tools in the custom data directory
20+
# Now use the new environment variable in the path
2121
path: ${{ env.ASDF_DATA_DIR }}/installs
2222
key: ${{ runner.os }}-asdf-${{ hashFiles('.tool-versions') }}
2323
restore-keys: |
2424
${{ runner.os }}-asdf-
2525
2626
- name: Setup ASDF
27-
# This uses the ASDF_DIR variable to clone the ASDF core
2827
uses: asdf-vm/actions/setup@v1
2928

3029
- name: Install ASDF Runtimes
31-
# This uses the ASDF_DATA_DIR variable to check for cached installs
3230
uses: asdf-vm/actions/install@v4
3331

3432
# --- 2. Pre-commit Caching and Execution ---
3533
- name: Cache Pre-commit Hooks
3634
uses: actions/cache@v4
3735
with:
38-
# Cache the standard pre-commit environment directory
3936
path: ~/.cache/pre-commit
4037
key: ${{ runner.os }}-pre-commit-${{ hashFiles('.pre-commit-config.yaml') }}
4138
restore-keys: |

0 commit comments

Comments
 (0)