ci: Fix image caching and apply other improvements #1756

pull hebasto wants to merge 4 commits into bitcoin-core:master from hebasto:251003-ci-docker changing 3 files +25 −43
  1. hebasto commented at 9:57 PM on October 3, 2025: member

    This PR fixes an issue where only the latest image cache was available.

    For other minor improvements, see the individual commit messages.

  2. hebasto force-pushed on Oct 4, 2025
  3. real-or-random added the label ci on Oct 13, 2025
  4. real-or-random added the label bug on Oct 13, 2025
  5. real-or-random commented at 1:26 PM on October 13, 2025: contributor
  6. in .github/actions/run-in-docker-action/action.yml:25 in fb9856a140 outdated
      19 |        id: main_builder
      20 |        continue-on-error: true
      21 |        with:
      22 |          context: .
      23 |          file: ${{ inputs.dockerfile }}
      24 | -        tags: ${{ inputs.tag }}
    


    real-or-random commented at 1:27 PM on October 13, 2025:

    Even after looking at the docs, I'm not sure what the tags parameter is actually supposed to do. Did you figure this out?


    hebasto commented at 1:48 PM on October 13, 2025:

    It's meant to be used when exporting a built image to a registry.

  7. in .github/actions/run-in-docker-action/action.yml:24 in fb9856a140 outdated
      22 |          context: .
      23 |          file: ${{ inputs.dockerfile }}
      24 | -        tags: ${{ inputs.tag }}
      25 |          load: true
      26 | -        cache-from: type=gha
      27 | +        cache-from: type=gha,scope=${{ runner.arch }}
    


    real-or-random commented at 1:29 PM on October 13, 2025:

    Would it be a good idea to add {{input.tag}} here (and maybe rename tag to scope)?


    hebasto commented at 1:50 PM on October 13, 2025:

    I don't think so. Tags are not used for caching.


    real-or-random commented at 1:54 PM on October 13, 2025:

    I think we're talking past each other. (But sorry, my message was very unclear.) My suggestion is to add an input parameter to the run-in-docker-action that is used as a prefix to scope, i.e., the caller sets the scope.

    In our case, the caller could then set scope=ci-image-${{ runner.arch }} or something like this.


    hebasto commented at 2:09 PM on October 13, 2025:

    I see. Reworked.

  8. in .github/actions/run-in-docker-action/action.yml:7 in fb9856a140 outdated
       2 | @@ -3,10 +3,8 @@ description: 'Run a command in a Docker container, while passing explicitly set
       3 |  inputs:
       4 |    dockerfile:
       5 |      description: 'A Dockerfile that defines an image'
       6 | -    required: true
       7 | -  tag:
       8 | -    description: 'A tag of an image'
       9 | -    required: true
      10 | +    required: false
      11 | +    default: ./ci/linux-debian.Dockerfile
    


    real-or-random commented at 1:31 PM on October 13, 2025:

    I'm not sure if this is a reasonable default. I mean, yes, this is what we always use. But currently, this action is not specific to libsecp256k1 at all, and I think it would be nice to keep it that way.


    hebasto commented at 1:52 PM on October 13, 2025:

    It seems unlikely that this action would be reused elsewhere.


    hebasto commented at 2:57 PM on October 13, 2025:

    The controversial commit has been dropped.


    real-or-random commented at 8:01 AM on October 14, 2025:

    It seems unlikely that this action would be reused elsewhere.

    True, but I think it's still a good idea to drop the default. It simply decreases coupling.

  9. in ci/linux-debian.Dockerfile:3 in fb9856a140
       0 | @@ -1,5 +1,7 @@
       1 |  FROM debian:stable-slim
       2 |  
       3 | +ENV DEBIAN_FRONTEND=noninteractive
    


    real-or-random commented at 1:33 PM on October 13, 2025:

    I think this is not a good idea because the Dockerfile can also be used interactively on a developer's machine. See https://serverfault.com/a/797318


    hebasto commented at 2:01 PM on October 13, 2025:

    Thanks! Reworked.

  10. hebasto force-pushed on Oct 13, 2025
  11. ci: Add `scope` parameter to `cache-{to,from}` options
    This change fixes an issue where only the latest image cache was
    available.
    122014edb3
  12. hebasto force-pushed on Oct 13, 2025
  13. ci: Drop `tags` input for `docker/build-push-action`
    The `tags` input is unused for caching.
    b2a95a420f
  14. ci: Bump `docker/build-push-action` version
    See https://github.com/docker/build-push-action/releases.
    70ae177ca0
  15. ci: Set `DEBIAN_FRONTEND=noninteractive`
    This suppresses `debconf: unable to initialize frontend: ...` warnings.
    f163c35897
  16. hebasto force-pushed on Oct 13, 2025
  17. hebasto commented at 2:57 PM on October 13, 2025: member

    @real-or-random

    Thank you for the review! Your feedback has been addressed.

  18. real-or-random approved
  19. real-or-random commented at 7:59 AM on October 14, 2025: contributor

    utACK f163c35897db9a4adc2a5b37926942817a4fdeb7

  20. real-or-random merged this on Oct 14, 2025
  21. real-or-random closed this on Oct 14, 2025

  22. hebasto deleted the branch on Oct 14, 2025
  23. fanquake referenced this in commit 42c7d35d3a on Oct 14, 2025
  24. fanquake referenced this in commit 3cbf7cb3e6 on Oct 15, 2025
  25. Sjors referenced this in commit d5660d3a13 on Feb 16, 2026
  26. github-actions[bot] referenced this in commit c3f80fff5f on Mar 1, 2026
  27. github-actions[bot] referenced this in commit 4aeff8400e on Mar 1, 2026
  28. github-actions[bot] referenced this in commit 5f15eb0c55 on Mar 1, 2026
  29. 0x000000000019d6689c085ae165831e934ff76 referenced this in commit d54574beca on Mar 2, 2026
  30. csjones referenced this in commit fb3e16af04 on Mar 2, 2026
  31. real-or-random referenced this in commit 56751a4cf0 on Mar 2, 2026
  32. 0x000000000019d6689c085ae165831e934ff76 referenced this in commit 924c279a64 on Mar 2, 2026
  33. csjones referenced this in commit bf90997db1 on Mar 2, 2026
  34. Fabcien referenced this in commit c2d88f8ac4 on Apr 23, 2026
  35. Fabcien referenced this in commit 759e60e99e on Apr 23, 2026
  36. vmta referenced this in commit 1ddc2f947f on Apr 26, 2026
  37. vmta referenced this in commit 56c40fe100 on Apr 27, 2026
Labels

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin-core/secp256k1. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-05-19 06:52 UTC