Conversation
📝 WalkthroughWalkthroughAdds a composite action to generate a GitHub App token, threads that token into setup steps (switching setup to feat/git-submodules), and enables recursive checkout of git submodules across several workflows; also updates cache key suffixes and README guidance for submodules. Changes
Sequence Diagram(s)sequenceDiagram
participant WF as GitHub Workflow
participant TokenAction as create-github-app-token
participant SetupAction as verkstedt/setup@feat/git-submodules
participant Steps as Downstream Steps
WF->>TokenAction: provide `app-id` + `private-key` (inputs)
TokenAction->>TokenAction: validate inputs
alt app-id + private-key present
TokenAction->>TokenAction: call actions/create-github-app-token@v2.2.1
TokenAction-->>WF: output token
else missing
TokenAction-->>WF: output github.token (fallback)
end
WF->>SetupAction: call setup with `token` input
SetupAction->>SetupAction: checkout (submodules: recursive)
SetupAction->>SetupAction: restore/save caches (v2 keys)
SetupAction-->>Steps: environment ready (token available)
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
Comment |
54d651d to
3ccf4de
Compare
3ccf4de to
ff89573
Compare
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.github/workflows/deploy-cloudfunction.yaml:
- Around line 51-54: The workflow's "Checkout code" step uses
actions/checkout@v6.0.2 with submodules: recursive but does not pass a token, so
private submodules will fail; add the GitHub App token flow used in other
workflows by inserting a create-github-app-token step (as in
docker-build-push/ci) and then update the actions/checkout step to pass with:
token: ${{ steps.create-github-app-token.outputs.token }} so private submodules
can be fetched during the deploy-cloudfunction workflow.
In @.github/workflows/docker-build-push.yaml:
- Around line 185-196: The workflow uses secrets.GH_AUTH_APP_SECRET in the
GitHub App token step (outputs referenced by steps.app-token.outputs.token) but
the secret is not declared in the workflow_call.secrets block; update the
workflow_call.secrets section to include GH_AUTH_APP_SECRET so the action that
creates the GitHub App token and the subsequent actions/checkout step (with
submodules: recursive) receive the secret at runtime.
In `@README.md`:
- Around line 196-205: The comment flags a capitalization nit for "GitHub" in
the README section titled "How to use repositories with private git submodules?"
(anchor id "user-content-submodules"), but the text already correctly uses
"GitHub"; no code change is needed—dismiss the nit/close the review item and
leave the README.md content as-is (do not alter the "GitHub creates
`github.token`" phrasing).
---
Duplicate comments:
In @.github/workflows/chromatic.yaml:
- Around line 53-64: The review note is duplicated; remove the redundant
"[duplicate_comment]" marker and/or duplicate review text so the comment only
appears once, and keep the explanation that the "app-token" step correctly feeds
the "Setup" action's token input (leave the existing steps "app-token" and
"Setup" unchanged, including the flagged `@feat/git-submodules` refs which are
tracked as TODO).
In @.github/workflows/ci.yaml:
- Around line 43-70: Change the ephemeral branch refs for the actions to stable,
pinned versions: replace
verkstedt/actions/create-github-app-token@feat/git-submodules and
verkstedt/actions/setup@feat/git-submodules with a specific released tag or
commit SHA (e.g., `@v1` or @<commit-sha>) to avoid relying on feature branch
names; keep the step ids (app-token, setup) and output usages
(steps.app-token.outputs.token, steps.setup.outputs.scripts) unchanged so token
propagation continues to work.
In @.github/workflows/docker-build-push.yaml:
- Line 187: Update the GitHub Actions step that currently uses the mutable
branch ref "verkstedt/actions/create-github-app-token@feat/git-submodules" to
the pinned release tag "verkstedt/actions/create-github-app-token@v1" (replace
the `@feat/git-submodules` ref with `@v1`) to remove the mutable branch reference
and avoid supply-chain risk.
4e24946 to
d56c693
Compare
d56c693 to
4b44740
Compare
Why?
Fixes https://verkstedt.atlassian.net/browse/TIOSDEV-45
What?
New action that calls
create-github-app-token, but falls back togithub.tokenand also yells at you if it’s misconfigured.Pass
submodules: recursivewhen usingcheckoutFor public repos this will work fine, for private ones, you need to pass a token that can read your repo and submodule. That’s what new action is for.
TODO before the merge
@v1→@feat/git-submodules@coderabbitai ignore