Use self references in reusable workflows - #91
Conversation
dceoy
left a comment
There was a problem hiding this comment.
Found one blocking CI issue in the documentation table. The workflow/action pinning change itself is consistent, and the Actions/YAML/security checks pass.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7030eedcd0
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
5f2d47f to
2f992f1
Compare
|
/oc Ping. |
|
Pong. I’m here. |
dceoy
left a comment
There was a problem hiding this comment.
Found one blocking workflow issue. The $/ feature itself is appropriate here, and GitHub documents that it resolves against the called workflow's repository/commit, but the root-form used in this PR has an empty action path. The current Actions runner implementation rejects an empty path after $/; CI is green because these event workflows are not exercised on synchronize.
Summary
dceoy/opencode-action@v0calls with the GitHub.com$/.self repository root referenceaction-refreusable-workflow inputopencode.ymlwrapperopencode-review.ymlrun directly on eligible pull request events andopencode-bot.ymlrun directly on eligible comment events$/.implementationactions/checkoutpin, and reusable workflow documentation pinscontents: readtoken ceiling and the separately write-scopedGH_TOKENrequired for code-writing tasksRationale
This follows up on the unresolved review thread from #89 while removing the mutable nested
v0dependency.GitHub.com's
$/pathself repository syntax resolves an action against the repository and commit of the workflow where the reference appears. Because this action is defined at the repository root, the reusable workflows useuses: $/.. Therefore, when a caller pinsdceoy/opencode-action/.github/workflows/opencode-*.yml@<SHA>, the nested action resolves to the same repository at that running commit without a second checkout or a separate revision input.The repository no longer needs a separate caller workflow: the reusable workflows also declare the repository events they handle. Repository-local runs retain the previous author, draft, dependency-bot, and mention filters, while reusable callers retain their prior behavior.
Release automation now keeps published examples synchronized by resolving the OpenCode release tag to its commit SHA, resolving the latest
actions/checkoutrelease to its commit SHA, and updating the README plus both reusable-workflow pins indocs/reusable-workflows.md. The workflow fails closed if the expected pin counts drift.Validation
$/.to target this repository's root actionaction-reffrom both reusable workflow APIs and documentation examplesactions/checkoutstep from both reusable workflows$/.syntax; other actionlint diagnostics remain enabledde968892b27dd42727fa175cd00610a54d091bf9, which contains the corrected self-reference implementationactions/checkoutreference, and exactly two reusable workflow references before editingactions/checkoutrelease isv7.0.1and resolves to3d3c42e5aac5ba805825da76410c181273ba90b1Follow-up to #89 and #90.