Skip to content

Consume actions-lockfile v0.0.1 and fix goproxy wiring in CI - #32

Merged
nodeselector merged 2 commits into
mainfrom
ns/lockfile-v001
Jun 8, 2026
Merged

Consume actions-lockfile v0.0.1 and fix goproxy wiring in CI#32
nodeselector merged 2 commits into
mainfrom
ns/lockfile-v001

Conversation

@nodeselector

Copy link
Copy Markdown
Collaborator

Follow-up to #30. Pins the tagged github/actions-lockfile/go v0.0.1 (goproxy serves tagged private modules but 404s bare pseudo-versions, so CI fell back to an unauthenticated direct git fetch), renames File.ActionsFile.Dependencies to match the released API (on-disk dependencies: key unchanged), and corrects the test.yml goproxy setup — job-level id-token: write + GOPROXY env (the merged version had permissions: mis-nested under on: and no proxy env).

Pin the tagged github/actions-lockfile/go v0.0.1 instead of an untagged
pseudo-version: goproxy.githubapp.com serves tagged private modules but
returns a miss for bare commits, sending go to an unauthenticated direct
git fetch that fails in CI. Rename File.Actions -> File.Dependencies to
match the released API (on-disk yaml key 'dependencies' is unchanged) and
name the concrete upgrade command for future-version lockfiles, which the
detached parser no longer hardcodes. Add the github/setup-goproxy OIDC
step to the go-test workflow so it can fetch the private module.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings June 8, 2026 19:29
GitHub Advanced Security started work on behalf of nodeselector June 8, 2026 19:29 View session
GitHub Advanced Security finished work on behalf of nodeselector June 8, 2026 19:30

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Ready to approve

The changes are small, cohesive, and match the stated intent; the only issues found are minor naming/doc-string consistency nits.

Note: this review does not count toward required approvals for merging.

Pull request overview

This PR updates gh-actions-pin to consume the released github/actions-lockfile/go v0.0.1 API and fixes CI module fetching by correctly wiring the GitHub goproxy + OIDC permissions at the job level.

Changes:

  • Bump github.com/github/actions-lockfile/go from a pseudo-version to v0.0.1 and align code with the released API (File.ActionsFile.Dependencies).
  • Improve future-lockfile-version handling by surfacing a concrete upgrade command in the error message.
  • Fix .github/workflows/test.yml goproxy setup by moving permissions under the job and setting the Go proxy-related env vars.
File summaries
File Description
internal/lockfile/state.go Aligns lockfile state handling with Dependencies field and improves error messaging for future lockfile versions.
internal/lockfile/state_test.go Updates tests to use Dependencies field when validating persisted lockfile content.
internal/lockfile/state_marshal.go Updates deterministic YAML emitter to serialize dependencies: from File.Dependencies.
go.mod Pins github.com/github/actions-lockfile/go to v0.0.1.
go.sum Updates module sums to match v0.0.1.
.github/workflows/test.yml Corrects job-level permissions + env so CI uses authenticated goproxy resolution.

Copilot's findings

  • Files reviewed: 5/6 changed files
  • Comments generated: 3

Note

Your feedback helps us improve the quality of this feature.
Please use 👍 or 👎 to tell us whether this assessment is correct.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 96 to 100
// Normalize on-disk entries to the canonical (lowercased) pin form so any
// legacy mixed-case keys are rewritten on the next Save.
normalizedActions := make(map[string]parserlock.Action, len(file.Actions))
for pinKey, action := range file.Actions {
normalizedActions := make(map[string]parserlock.Action, len(file.Dependencies))
for pinKey, action := range file.Dependencies {
pin, ok := parserlock.ParsePin(pinKey)
Comment on lines +50 to +52
if len(file.Dependencies) > 0 {
keys := make([]string, 0, len(file.Dependencies))
for k := range file.Dependencies {
Comment thread internal/lockfile/state_test.go Outdated
Comment on lines +220 to +221
if _, ok := store2.file.Dependencies[sharedPin]; !ok {
t.Errorf("expected shared dep %s in actions, keys=%v", sharedPin, actionKeys(store2.file.Dependencies))
Address review nits: the local map var and the schema-field doc comments
and a test failure message still said 'actions' after the field rename.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
GitHub Advanced Security started work on behalf of nodeselector June 8, 2026 19:39 View session
GitHub Advanced Security finished work on behalf of nodeselector June 8, 2026 19:40
@nodeselector
nodeselector merged commit e5de464 into main Jun 8, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants