Skip to content

Commit cea1912

Browse files
committed
use GHA id-token for sccache-dist auth
1 parent b7ef021 commit cea1912

File tree

2 files changed

+20
-8
lines changed

2 files changed

+20
-8
lines changed

.github/workflows/ci.cpu.yml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,10 +73,16 @@ jobs:
7373
source /etc/profile
7474
set -x;
7575
76-
devcontainer-utils-init-sccache-dist \
77-
--enable-sccache-dist - <<< " \
78-
--auth-type 'token' \
79-
--auth-token '${{ secrets.STDEXEC_BUILD_CLUSTER_SECRET }}' \
76+
devcontainer-utils-init-sccache-dist \
77+
--enable-sccache-dist - <<< " \
78+
--auth-type 'token' \
79+
--auth-token '$( \
80+
curl -fsSL -H "Authorization: Bearer $( \
81+
curl -fsSL -H "Authorization: bearer $ACTIONS_ID_TOKEN_REQUEST_TOKEN" \
82+
"${ACTIONS_ID_TOKEN_REQUEST_URL}&audience=token.rapids.nvidia.com" \
83+
| jq -r '.value' \
84+
)" https://token.rapids.nvidia.com/gh/token/exchange \
85+
| jq -r '.token')' \
8086
";
8187
8288
# Copy source folder into ~/stdexec

.github/workflows/ci.gpu.yml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,10 +75,16 @@ jobs:
7575
source /etc/profile
7676
set -x;
7777
78-
devcontainer-utils-init-sccache-dist \
79-
--enable-sccache-dist - <<< " \
80-
--auth-type 'token' \
81-
--auth-token '${{ secrets.STDEXEC_BUILD_CLUSTER_SECRET }}' \
78+
devcontainer-utils-init-sccache-dist \
79+
--enable-sccache-dist - <<< " \
80+
--auth-type 'token' \
81+
--auth-token '$( \
82+
curl -fsSL -H "Authorization: Bearer $( \
83+
curl -fsSL -H "Authorization: bearer $ACTIONS_ID_TOKEN_REQUEST_TOKEN" \
84+
"${ACTIONS_ID_TOKEN_REQUEST_URL}&audience=token.rapids.nvidia.com" \
85+
| jq -r '.value' \
86+
)" https://token.rapids.nvidia.com/gh/token/exchange \
87+
| jq -r '.token')' \
8288
";
8389
8490
# Copy source folder into ~/stdexec

0 commit comments

Comments
 (0)