Skip to content

Commit 10446cb

Browse files
committed
Fix CI to access the new GH cache
1 parent 1fe85e7 commit 10446cb

File tree

2 files changed

+7
-13
lines changed

2 files changed

+7
-13
lines changed

.github/workflows/pants.yaml

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,13 @@ jobs:
2424
matrix:
2525
python-version: [3.8]
2626
steps:
27-
- uses: actions/checkout@v4
27+
- uses: actions/checkout@v5
2828

29-
- uses: actions/setup-python@v5
29+
- uses: actions/setup-python@v6
3030
with:
3131
python-version: ${{ matrix.python-version }}
3232

33-
- uses: crazy-max/ghaction-setup-docker@v3
33+
- uses: docker/setup-docker-action@v4
3434
with:
3535
daemon-config: |
3636
{
@@ -49,14 +49,8 @@ jobs:
4949
uses: docker/setup-qemu-action@v3
5050
with:
5151
platforms: linux/amd64,linux/arm64
52-
53-
- name: Set up environment variables for Pants (Docker) to use GHA Cache
54-
uses: actions/github-script@v7
55-
with:
56-
script: |
57-
core.exportVariable("ACTIONS_CACHE_URL", process.env.ACTIONS_CACHE_URL || "");
58-
core.exportVariable("ACTIONS_RUNTIME_TOKEN", process.env.ACTIONS_RUNTIME_TOKEN || "");
59-
52+
- name: Expose ACTIONS_* env vars to Pants, so it can use the GHA cache
53+
uses: crazy-max/ghaction-github-runtime@v3
6054
- uses: pantsbuild/actions/init-pants@v9
6155
# This action bootstraps pants and manages 2-3 GHA caches.
6256
# See: github.com/pantsbuild/actions/tree/main/init-pants/
@@ -81,7 +75,6 @@ jobs:
8175

8276
- name: Bootstrap Pants
8377
run: pants --version
84-
8578
- name: Check Pants config files
8679
run: pants tailor --check update-build-files --check '::'
8780

pants.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,9 @@ use_rust_parser = true
3131

3232
[docker]
3333
env_vars = [
34-
"ACTIONS_CACHE_URL",
34+
"ACTIONS_RESULTS_URL",
3535
"ACTIONS_RUNTIME_TOKEN",
36+
"ACTIONS_CACHE_SERVICE_V2",
3637
"DYNAMIC_TAG",
3738
]
3839
use_buildx=true

0 commit comments

Comments
 (0)