Remove relock composite action by nodeselector · Pull Request #72 · github/gh-actions-lock · GitHub
Skip to content

Remove relock composite action - #72

Merged
nodeselector merged 2 commits into
mainfrom
nodeselector-relock-annotation-on-error
Jun 29, 2026
Merged

nodeselector merged 2 commits into
mainfrom
nodeselector-relock-annotation-on-error

Conversation

@nodeselector

@nodeselector nodeselector commented Jun 29, 2026 •

Copy link
Copy Markdown
Collaborator

Removes actions/relock/ entirely. The relock composite action can't work in practice -- GITHUB_TOKEN doesn't have access to private action repos like github/gh-actions-lock itself, so resolution always fails for any repo that uses private actions.

Ref: https://github.com/github/actions-dispatch/issues/768

When the workflow token lacks access to a private action repository,
the relock step now emits a ::warning:: annotation telling the user
to run gh actions-lock locally instead of failing the entire workflow.
This prevents Dependabot PRs from being blocked by token permission
gaps that can only be resolved locally.
Copilot AI review requested due to automatic review settings June 29, 2026 13:11
GitHub Advanced Security started work on behalf of nodeselector June 29, 2026 13:11
GitHub Advanced Security finished work on behalf of nodeselector June 29, 2026 13:11

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.

⚠️ Not ready to approve

The new Bash snippet uses echo in a way that can subtly corrupt/alter captured output and makes the error-detection check less reliable; a small adjustment (e.g., printf + grep -F on the variable) is needed.

Pull request overview

This PR updates the actions/relock composite action so that when gh-actions-lock fails specifically due to a workflow token lacking access to a private repository (“repository not found or not accessible”), the workflow emits a ::warning:: and continues instead of failing the job—unblocking Dependabot PR workflows while still surfacing the remediation path.

Changes:

  • Capture gh-actions-lock stdout/stderr and exit code instead of letting the step fail immediately.
  • Detect the “repository not found or not accessible” failure mode and convert it into a workflow warning with an exit code of 0.
  • Preserve existing behavior (non-zero exit) for all other error cases.
File summaries
File Description
actions/relock/action.yml Wraps the relock command to selectively warn-and-continue for private repo access failures instead of failing the workflow.

Review details

  • Files reviewed: 1/1 changed files
  • Comments generated: 1
  • Review effort level: Low

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 thread actions/relock/action.yml Outdated
Comment on lines +29 to +33
The relock composite action can't work in practice — the workflow
token (GITHUB_TOKEN) doesn't have access to private action repos
like github/gh-actions-lock itself, so resolution always fails.

See: github/actions-dispatch#768
@nodeselector nodeselector changed the title relock action: warn instead of failing on inaccessible repos Remove relock composite action Jun 29, 2026
GitHub Advanced Security started work on behalf of nodeselector June 29, 2026 13:39
GitHub Advanced Security finished work on behalf of nodeselector June 29, 2026 13:39
@nodeselector
nodeselector merged commit 9e640ac into main Jun 29, 2026
11 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