-
-
Notifications
You must be signed in to change notification settings - Fork 0
fix(ci): resync actions.lock and add a lock-sync recurrence gate #89
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
3061e08
fix(ci): resync actions.lock and add a lock-sync recurrence gate
hyperpolymath 920a24e
fix(ci): give lock-sync-gate.yml an actions.lock entry
hyperpolymath 89b9bd5
check-lock-sync: add clause 4, lockfile COVERAGE
hyperpolymath 3a590bd
fix(actions-lock): drop the job-level reusable ref that flips the ver…
hyperpolymath 2078e83
Update scripts/check-lock-sync.sh
hyperpolymath e20a457
Update .github/workflows/lock-sync-gate.yml
hyperpolymath File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,68 @@ | ||
| # SPDX-License-Identifier: MPL-2.0 | ||
| name: Lock Sync Gate | ||
|
|
||
| # Fails any pull request whose .github/workflows/actions.lock has drifted from | ||
| # the workflow YAML. That drift is not cosmetic: GitHub refuses such a run at | ||
| # startup, creating ZERO jobs, and reports only "This run likely failed because | ||
| # of a workflow file issue." A single grouped Dependabot bump can take out most | ||
| # of a repository's CI that way, because Dependabot rewrites `uses:` refs in the | ||
| # YAML and cannot touch the lockfile. Measured across 200 repositories on | ||
| # 2026-09-22: 39 had silently dead CI from exactly this cause. | ||
| # See hyperpolymath/standards#968. | ||
| # | ||
| # This workflow deliberately carries NO `uses:` of its own. It checks out by | ||
| # calling git in a `run:` step instead of using actions/checkout, so it has no | ||
| # lockfile entry to go stale and is structurally immune to the very failure it | ||
| # detects. Do not add a `uses:` to this file. | ||
| # | ||
| # There is also no `paths:` filter, on purpose: a filtered workflow never | ||
| # reports on pull requests that miss the filter, which deadlocks any branch | ||
| # ruleset that requires this check. | ||
|
|
||
| on: | ||
| pull_request: | ||
| push: | ||
| branches: [main] | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| concurrency: | ||
| group: lock-sync-gate-${{ github.ref }} | ||
| cancel-in-progress: true | ||
|
|
||
| jobs: | ||
| lock-sync: | ||
| name: actions.lock is in sync with the workflow YAML | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 5 | ||
| steps: | ||
| - name: Check out without actions/checkout | ||
| env: | ||
| REPO: ${{ github.repository }} | ||
| SHA: ${{ github.event.pull_request.head.sha || github.sha }} | ||
| TOKEN: ${{ github.token }} | ||
| run: | | ||
| set -euo pipefail | ||
| # Authenticate the fetch. An anonymous clone works only for public | ||
| # repositories; this gate must also run on private ones. The header | ||
| # form is used rather than a token in the remote URL so the | ||
| # credential is never written into .git/config. | ||
| AUTH="AUTHORIZATION: basic $(printf 'x-access-token:%s' "${TOKEN}" | base64 -w0)" | ||
| git init -q . | ||
| git remote add origin "https://github.com/${REPO}.git" | ||
| git -c http.extraheader="${AUTH}" fetch -q --depth 1 origin "${SHA}" | ||
| git checkout -q FETCH_HEAD | ||
| echo "checked out ${SHA}" | ||
|
|
||
| - name: Install GNU awk | ||
| run: | | ||
| sudo apt-get update | ||
| sudo apt-get install -y gawk | ||
|
|
||
| - name: Verify lockfile synchronisation | ||
| run: | | ||
| set -euo pipefail | ||
| test -x scripts/check-lock-sync.sh \ | ||
| || { echo "::error::scripts/check-lock-sync.sh missing or not executable"; exit 1; } | ||
| ./scripts/check-lock-sync.sh | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.