Skip to content

Support locking GitHub Actions without a checkout - #319

Draft
mrecachinas wants to merge 1 commit into
mainfrom
mrecachinas-remote-repository-support
Draft

mrecachinas wants to merge 1 commit into
mainfrom
mrecachinas-remote-repository-support

Conversation

@mrecachinas

Copy link
Copy Markdown
Member

Checking or updating a repository's workflow lockfile currently requires a local checkout. This adds a remote mode so you can point gh actions-lock at a repository, its workflows directory, or one workflow and run the same checks from anywhere.

Remote mode is read-only by default and uses the Contents API to read workflows, same-repository actions, and actions.lock at one commit. --commit publishes the generated changes together on the selected branch. --pr puts them on a new branch and opens a pull request. Publishing checks the expected branch head before writing and skips the API writes entirely when nothing changed.

Example

Read-only run against this repository at the base commit (stdout):

$ gh actions-lock --json=valid https://github.com/github/gh-actions-lock/blob/ba122d84636839992886a948e685e64215901331/.github/workflows/test.yml
{
  "cli_version": "v0.4.2-0.20261125211255-aeea867acf9c",
  "lockfile_version": "v0.0.3",
  "valid": true
}

Validation

The Go suite and go vet passed using the pinned SDK from its source tag. The read-only path was also exercised against GitHub; publishing was verified with mocked API requests, including a moved PR base and a no-op run.

Agent assessment

Change confidence: High. The existing suite covers the checkout path, the live run confirms remote reads, and the command tests verify that workflow and lockfile changes are sent in one commit. Live publishing permissions and branch rules were not exercised.

Head revision: aeea867acf9cd8a0442d1c498de0a7922674c469

Read remote workflow targets through the Contents API and publish fixes as one commit, optionally on a pull request branch.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
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.

1 participant