ci: refactor docker action to return provider str
What changed, and why it matters
This is a routine internal cleanup of Bitcoin Core's GitHub Actions CI configuration. It renames a workflow output from a true/false string ('use-cirrus-runners') to a provider name string ('provider' with values 'gha' or 'cirrus') and updates the action that reads it. The commit message explicitly says it is a refactor to avoid relying on the string 'false' being treated as truthy in future evaluations. There is no change to Bitcoin Core's actual code, consensus rules, wallet handling, networking, or any user-facing behavior.
No security action required. Treat as normal CI maintenance.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The patch refactors .github/workflows/ci.yml and .github/actions/configure-docker/action.yml. It replaces the boolean-ish string output use-cirrus-runners with a provider string output (‘gha’ or ‘cirrus’), and changes the configure-docker action’s input from use-cirrus to cache-provider with an options list. The conditional logic is updated from inputs.use-cirrus == 'true' to inputs.cache-provider == 'cirrus'. This is a defensive maintainability change in CI YAML only; it does not alter build scripts, Docker images, cache backends, or repository code.
Changed components
.github/workflows/ci.yml.github/actions/configure-docker/action.ymlInspect captured patch +14 / −11
diff --git a/.github/actions/configure-docker/action.yml b/.github/actions/configure-docker/action.yml
index c78df86b..09a1e6fd 100644
--- a/.github/actions/configure-docker/action.yml
+++ b/.github/actions/configure-docker/action.yml
@@ -1,9 +1,12 @@
name: 'Configure Docker'
description: 'Set up Docker build driver and configure build cache args'
inputs:
- use-cirrus:
- description: 'Use cirrus cache'
+ cache-provider:
+ description: 'gha or cirrus cache provider'
required: true
+ options:
+ - gh
+ - cirrus
runs:
using: 'composite'
steps:
@@ -32,7 +35,7 @@ runs:
# which are set automatically when running on GitHub infra: https://docs.docker.com/build/cache/backends/gha/#synopsis
# Use cirrus cache host
- if [[ ${{ inputs.use-cirrus }} == 'true' ]]; then
+ if [[ ${{ inputs.cache-provider }} == 'cirrus' ]]; then
url_args="url=${CIRRUS_CACHE_HOST},url_v2=${CIRRUS_CACHE_HOST}"
else
url_args=""
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 52d21ef3..43beb53e 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -33,15 +33,15 @@ jobs:
name: 'determine runners'
runs-on: ubuntu-latest
outputs:
- use-cirrus-runners: ${{ steps.runners.outputs.use-cirrus-runners }}
+ provider: ${{ steps.runners.outputs.provider }}
steps:
- id: runners
run: |
if [[ "${REPO_USE_CIRRUS_RUNNERS}" == "${{ github.repository }}" ]]; then
- echo "use-cirrus-runners=true" >> "$GITHUB_OUTPUT"
+ echo "provider=cirrus" >> "$GITHUB_OUTPUT"
echo "::notice title=Runner Selection::Using Cirrus Runners"
else
- echo "use-cirrus-runners=false" >> "$GITHUB_OUTPUT"
+ echo "provider=gha" >> "$GITHUB_OUTPUT"
echo "::notice title=Runner Selection::Using GitHub-hosted runners"
fi
@@ -312,7 +312,7 @@ jobs:
windows-cross:
name: 'Linux->Windows cross, no tests'
needs: runners
- runs-on: ${{ needs.runners.outputs.use-cirrus-runners == 'true' && 'ghcr.io/cirruslabs/ubuntu-runner-amd64:24.04-sm' || 'ubuntu-24.04' }}
+ runs-on: ${{ needs.runners.outputs.provider == 'cirrus' && 'ghcr.io/cirruslabs/ubuntu-runner-amd64:24.04-sm' || 'ubuntu-24.04' }}
if: ${{ vars.SKIP_BRANCH_PUSH != 'true' || github.event_name == 'pull_request' }}
env:
@@ -332,7 +332,7 @@ jobs:
- name: Configure Docker
uses: ./.github/actions/configure-docker
with:
- use-cirrus: ${{ needs.runners.outputs.use-cirrus-runners }}
+ cache-provider: ${{ needs.runners.outputs.provider }}
- name: CI script
run: ./ci/test_run_all.sh
@@ -422,7 +422,7 @@ jobs:
ci-matrix:
name: ${{ matrix.name }}
needs: runners
- runs-on: ${{ needs.runners.outputs.use-cirrus-runners == 'true' && matrix.cirrus-runner || matrix.fallback-runner }}
+ runs-on: ${{ needs.runners.outputs.provider == 'cirrus' && matrix.cirrus-runner || matrix.fallback-runner }}
if: ${{ vars.SKIP_BRANCH_PUSH != 'true' || github.event_name == 'pull_request' }}
timeout-minutes: ${{ matrix.timeout-minutes }}
@@ -513,7 +513,7 @@ jobs:
- name: Configure Docker
uses: ./.github/actions/configure-docker
with:
- use-cirrus: ${{ needs.runners.outputs.use-cirrus-runners }}
+ cache-provider: ${{ needs.runners.outputs.provider }}
- name: Enable bpfcc script
if: ${{ env.CONTAINER_NAME == 'ci_native_asan' }}
@@ -550,7 +550,7 @@ jobs:
- name: Configure Docker
uses: ./.github/actions/configure-docker
with:
- use-cirrus: ${{ needs.runners.outputs.use-cirrus-runners }}
+ cache-provider: ${{ needs.runners.outputs.provider }}
- name: CI script
run: |
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.