Skip to content

Commit 6c4fe40

Browse files
committed
Merge bitcoin/bitcoin#33508: ci: fix buildx gha cache authentication on forks
bc70695 ci: expose all ACTIONS_* vars (willcl-ark) Pull request description: When using `docker buildx build` in conjunction with the `gha` backend cache type (as we do in our CI) it's important to specify the URL and TOKEN needed to authenticate. On Cirrus runners this is working with only `ACTIONS_CACHE_URL` and `ACTIONS_RUNTIME_TOKEN`, but this is not enough for the GitHub backend. Fix this by exporting all `ACTIONS_*` variables. This fixes docker build layer cache restore/save on forks or where GH-hosted runners are being used, and addresses bitcoin/bitcoin#31965 (comment) ACKs for top commit: m3dwards: ACK bc70695 maflcko: lgtm ACK bc70695 Tree-SHA512: 13e973bb1c1ca5448dd6c3c176fb5ce39c725886ba2012d3253158205309a7038a1430135b37400e1f2f69408a9d0f4e2b3c5f0515154a593ec382ab7db10266
2 parents 64a7c7c + bc70695 commit 6c4fe40

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

.github/actions/configure-docker/action.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,12 @@ runs:
2222
uses: actions/github-script@v6
2323
with:
2424
script: |
25-
core.exportVariable('ACTIONS_CACHE_URL', process.env['ACTIONS_CACHE_URL'])
26-
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env['ACTIONS_RUNTIME_TOKEN'])
25+
Object.keys(process.env).forEach(function (key) {
26+
if (key.startsWith('ACTIONS_')) {
27+
core.info(`Exporting ${key}`);
28+
core.exportVariable(key, process.env[key]);
29+
}
30+
});
2731
2832
- name: Construct docker build cache args
2933
shell: bash

0 commit comments

Comments
 (0)