Inside Bitcoin
Opening the selected file…
Inside Bitcoin
Opening the selected file…
The code behind the network, with room to understand it.
Release published 2026-10-28 · Snapshot fetched 2026-11-01. Latest stable release at fetch time; development branches and Git history are excluded. Only the selected code window and visible folders load here.
1name: 'Configure Docker'2description: 'Set up Docker build driver and configure build cache args'3inputs:4provider:5description: 'The cache provider to use'6required: false7default: 'gha'8runs:9using: 'composite'10steps:11- name: Set up Docker Buildx for Warp cache12if: ${{ inputs.provider == 'warp' }}13uses: docker/setup-buildx-action@v414with:15driver-opts: |16network=host17env.BUILDKIT_STEP_LOG_MAX_SIZE=524288019- name: Set up Docker Buildx20if: ${{ inputs.provider != 'warp' }}21uses: docker/setup-buildx-action@v422with:23driver-opts: |24env.BUILDKIT_STEP_LOG_MAX_SIZE=524288026# This is required when using the gha cache backend with a manual docker buildx invocation.27# Docker will check for variables $ACTIONS_CACHE_URL, $ACTIONS_RESULTS_URL and $ACTIONS_RUNTIME_TOKEN28# which are set automatically when running on GitHub infra: https://docs.docker.com/build/cache/backends/gha/#synopsis29- name: Expose actions cache variables30uses: actions/github-script@v831with:32script: |33Object.keys(process.env).forEach(function (key) {34if (key.startsWith('ACTIONS_')) {35core.info(`Exporting ${key}`);36core.exportVariable(key, process.env[key]);37}38});40- name: Construct docker build cache args41shell: bash42run: |43cache_options="scope=${CONTAINER_NAME}"44if [[ "${{ inputs.provider }}" == "warp" ]]; then45cache_options="url=http://127.0.0.1:49160/,version=1,${cache_options}"46fi48# Configure docker build cache backend49# Always optimistically --cache‑from in case a cache blob exists50args=(--cache-from "type=gha,${cache_options}")52# Only add --cache-to when pushing to the default branch.53if [[ ${{ github.event_name }} == "push" && ${{ github.ref_name }} == ${{ github.event.repository.default_branch }} ]]; then54args+=(--cache-to "type=gha,mode=max,ignore-error=true,${cache_options}")55fi57# Always `--load` into docker images (needed when using the `docker-container` build driver).58args+=(--load)60echo "DOCKER_BUILD_CACHE_ARG=${args[*]}" >> $GITHUB_ENV
Independent explanations by MyBitcoinExplorer. Not affiliated with or endorsed by Bitcoin Core. Guides are educational and do not replace the source or its tests.
Bitcoin Core source © its contributors, distributed under the MIT license. Original notices and bundled third-party licenses are retained in the source tree.