| 1 | # CI pin maintenance |
| 2 | |
| 3 | `.github/workflows/ci.yml` pins every `PerlToolsTeam/github_workflows` |
| 4 | reference to a commit SHA rather than `@main`. |
| 5 | |
| 6 | ## Why pinned |
| 7 | |
| 8 | Tracking `@main` meant upstream could change this repository's CI with no |
| 9 | commit here. That is not hypothetical: PDF-Reuse lost Windows CI for six |
| 10 | months to an upstream regression, and the eventual fix arrived the same way. |
| 11 | Neither event produced a commit in any of these repositories, and both were |
| 12 | found only by re-measuring months later. |
| 13 | |
| 14 | ## Why this needs a human |
| 15 | |
| 16 | **Dependabot does not maintain these pins.** It advances a SHA-pinned GitHub |
| 17 | Actions ref only when the upstream repository publishes tags — see |
| 18 | `github_actions/lib/dependabot/github_actions/update_checker.rb` in |
| 19 | dependabot-core, where `latest_commit_sha` returns early unless |
| 20 | `latest_version_tag` is present. `PerlToolsTeam/github_workflows` has no |
| 21 | tags, so no update PR is ever opened for these refs. |
| 22 | |
| 23 | The `.github/dependabot.yml` in this repo is still useful — it covers tagged |
| 24 | `actions/*` refs — but it is inert for the pins below. |
| 25 | |
| 26 | ## What the pin does and does not freeze |
| 27 | |
| 28 | Frozen: the `PerlToolsTeam/github_workflows` files themselves (the composite |
| 29 | action and the reusable workflows). |
| 30 | |
| 31 | Not frozen: |
| 32 | |
| 33 | - Actions invoked *inside* the pinned upstream files, which use tag refs. |
| 34 | In the composite action: `actions/checkout@v5`, |
| 35 | `shogo82148/actions-setup-perl@v1`, `ilammy/msvc-dev-cmd@v1`, |
| 36 | `actions/upload-artifact@v5`. In the coverage and perlcritic reusable |
| 37 | workflows: `actions/checkout@v7`. Tags can move. |
| 38 | - Container images in the coverage and perlcritic workflows |
| 39 | (`davorg/perl-coveralls:latest`, `davorg/perl-perlcritic`), which float. |
| 40 | |
| 41 | So the pin is a boundary around one upstream repository, not a full CI lock. |
| 42 | It removes the failure mode that actually bit us; it does not make CI |
| 43 | bit-for-bit reproducible. |
| 44 | |
| 45 | ## How to review the pin |
| 46 | |
| 47 | Roughly quarterly, or when CI behaves unexpectedly: |
| 48 | |
| 49 | gh api repos/PerlToolsTeam/github_workflows/commits/main \ |
| 50 | --jq '"\(.sha) \(.commit.author.date) \(.commit.message|split("\n")[0])"' |
| 51 | |
| 52 | Compare against the SHA in `ci.yml`. To see what changed since the pin: |
| 53 | |
| 54 | gh api "repos/PerlToolsTeam/github_workflows/commits?sha=main&since=<pin-date>" \ |
| 55 | --jq '.[] | "\(.commit.author.date) \(.sha[0:8]) \(.commit.message|split("\n")[0])"' |
| 56 | |
| 57 | To advance: update all three refs in `ci.yml` plus the trailing |
| 58 | `# main @ <date>` comments, push to a branch, and let the PR's own CI run be |
| 59 | the verification. Do not advance a pin without a green run — the point of the |
| 60 | pin is that upstream changes arrive as a reviewable event rather than a |
| 61 | surprise. |
| 62 | |
| 63 | Keep the same SHA across all five distributions (PDF-Reuse, PDF-Reuse-Barcode, |
| 64 | PDF-Reuse-OverlayChart, PDF-Reuse-Tutorial, Business-US-USPS-IMB) so a |
| 65 | divergence between them is always a signal rather than noise. |