Shared setup action#1
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces a new GitHub composite action for workspace setup and configures Dependabot to track GitHub Actions updates. The setup action manages submodule checkouts, environment variable configuration, apt dependency installation, and JDK/Gradle setup. Feedback focuses on improving the action's modularity by replacing hardcoded repository names and environment variables with inputs, resolving a TODO regarding outputs, and enhancing shell script robustness through proper quoting and more flexible path handling.
There was a problem hiding this comment.
Pull request overview
This PR introduces shared GitHub automation configuration by adding a composite “setup” action under .github/actions/ and enabling Dependabot updates for GitHub Actions.
Changes:
- Add a Dependabot configuration to keep GitHub Actions dependencies up to date (including grouping).
- Add a new composite action (
.github/actions/setup) intended to centralize repository setup steps (submodules, env setup, apt deps, Java/Gradle).
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
.github/dependabot.yml |
Adds Dependabot configuration for GitHub Actions updates. |
.github/actions/setup/action.yml |
Adds a composite setup action with git/submodule, env, apt, Java, and Gradle setup steps. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| - name: MT check out submodules | ||
| shell: bash | ||
| run: ./checkout_submodules.sh |
There was a problem hiding this comment.
The composite action calls ./checkout_submodules.sh, but that script does not exist anywhere in this repository. As-is, any workflow using this action in this repo will fail at runtime. Either add the script to the repo (and ensure it’s executable) or change the action to reference a script that is shipped with the action itself (e.g., via ${{ github.action_path }}).
| run: ./checkout_submodules.sh | |
| run: | | |
| echo "[MT] > Syncing and checking out git submodules..." | |
| git submodule sync --recursive | |
| git submodule update --init --recursive |
| run: ./commons/code_sync.sh | ||
|
|
||
| - name: MT code setup | ||
| shell: bash | ||
| run: ./commons/code_setup.sh |
There was a problem hiding this comment.
./commons/code_sync.sh and ./commons/code_setup.sh are referenced here, but there is no commons/ directory (or these scripts) in this repository. This will cause the action to fail when run from this repo unless those scripts are added or the action is designed to run against a different checked-out repository and uses explicit paths (e.g., ${{ github.workspace }} vs ${{ github.action_path }}).
| run: ./commons/code_sync.sh | |
| - name: MT code setup | |
| shell: bash | |
| run: ./commons/code_setup.sh | |
| run: | | |
| SCRIPT="${{ github.workspace }}/commons/code_sync.sh" | |
| if [ ! -f "$SCRIPT" ]; then | |
| echo "[MT] > Missing required script: $SCRIPT" | |
| exit 1 | |
| fi | |
| bash "$SCRIPT" | |
| - name: MT code setup | |
| shell: bash | |
| run: | | |
| SCRIPT="${{ github.workspace }}/commons/code_setup.sh" | |
| if [ ! -f "$SCRIPT" ]; then | |
| echo "[MT] > Missing required script: $SCRIPT" | |
| exit 1 | |
| fi | |
| bash "$SCRIPT" |
| inputs: | ||
| code-sync: | ||
| description: "Sync code from submodules before setup." | ||
| type: boolean |
There was a problem hiding this comment.
type: boolean is not a supported key for action inputs in action.yml (it’s used for workflow_call inputs, not composite actions). This will likely make the action metadata invalid. Remove the type field (and keep default/required), or convert this into a reusable workflow if you need typed inputs.
| type: boolean |
| code-sync: | ||
| description: "Sync code from submodules before setup." |
There was a problem hiding this comment.
The input id code-sync contains a hyphen, but it’s later referenced via dot-notation (inputs.code-sync). In GitHub expressions, - is the subtraction operator, so this can be parsed incorrectly. Prefer renaming the input to code_sync (or similar), or reference it with bracket syntax (e.g., inputs['code-sync']).
No description provided.